Browse Source

allow config to be None in constructor of Interface

283
thomasv 12 years ago
parent
commit
81b29a48a1
  1. 6
      lib/interface.py
  2. 3
      scripts/blocks

6
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(':')

3
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',[])])

Loading…
Cancel
Save