|
@ -3,9 +3,11 @@ |
|
|
from electrum import TcpStratumInterface |
|
|
from electrum import TcpStratumInterface |
|
|
|
|
|
|
|
|
i = TcpStratumInterface('ecdsa.org', 50001) |
|
|
i = TcpStratumInterface('ecdsa.org', 50001) |
|
|
|
|
|
i.init_socket() |
|
|
i.start() |
|
|
i.start() |
|
|
i.send([('blockchain.numblocks.subscribe',[])]) |
|
|
i.send([('blockchain.numblocks.subscribe',[])]) |
|
|
|
|
|
|
|
|
while True: |
|
|
while True: |
|
|
r = i.responses.get(True, 100000000000) |
|
|
r = i.responses.get(True, 100000000000) |
|
|
|
|
|
if r.get('method') == 'blockchain.numblocks.subscribe': |
|
|
print r.get('result') |
|
|
print r.get('result') |
|
|