git://git.novaco.in
/
electrum-nvc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
(parent:
1a78103
)
allow config to be None in constructor of Interface
author
thomasv
<thomasv@gitorious>
Fri, 12 Oct 2012 14:31:05 +0000 (16:31 +0200)
committer
thomasv
<thomasv@gitorious>
Fri, 12 Oct 2012 14:31:05 +0000 (16:31 +0200)
lib/interface.py
patch
|
blob
|
history
scripts/blocks
patch
|
blob
|
history
diff --git
a/lib/interface.py
b/lib/interface.py
index
ddb6a0c
..
655f2ca
100644
(file)
--- a/
lib/interface.py
+++ b/
lib/interface.py
@@
-285,8
+285,12
@@
class TcpStratumInterface(InterfaceAncestor):
class Interface(TcpStratumInterface, HttpStratumInterface):
- def __init__(self, config):
+ def __init__(self, config = None):
+ if config is None:
+ from simple_config import SimpleConfig
+ config = SimpleConfig()
+
try:
s = config.get('server')
host, port, protocol = s.split(':')
diff --git
a/scripts/blocks
b/scripts/blocks
index
8f7500d
..
67db84a
100755
(executable)
--- a/
scripts/blocks
+++ b/
scripts/blocks
@@
-2,8
+2,7
@@
import electrum
-i = electrum.Interface({'server':'electrum.novit.ro:50001:t'})
-
+i = electrum.Interface()
i.start()
i.send([('blockchain.numblocks.subscribe',[])])