add init_socket to scripts
This commit is contained in:
4
blocks
4
blocks
@@ -3,9 +3,11 @@
|
||||
from electrum import TcpStratumInterface
|
||||
|
||||
i = TcpStratumInterface('ecdsa.org', 50001)
|
||||
i.init_socket()
|
||||
i.start()
|
||||
i.send([('blockchain.numblocks.subscribe',[])])
|
||||
|
||||
while True:
|
||||
r = i.responses.get(True, 100000000000)
|
||||
print r.get('result')
|
||||
if r.get('method') == 'blockchain.numblocks.subscribe':
|
||||
print r.get('result')
|
||||
|
||||
@@ -9,6 +9,7 @@ except:
|
||||
print "usage: watch_address <bitcoin_address>"
|
||||
|
||||
i = TcpStratumInterface('ecdsa.org', 50001)
|
||||
i.init_socket()
|
||||
i.start()
|
||||
i.send([('blockchain.address.subscribe',[addr])])
|
||||
|
||||
|
||||
Reference in New Issue
Block a user