Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

executable file 17 lines (13 sloc) 0.395 kB
#!/usr/bin/env python
from electrum import TcpStratumInterface
i = TcpStratumInterface('electrum.novit.ro', 50001)
i.init_socket()
i.start()
i.send([('blockchain.numblocks.subscribe',[])])
while True:
try:
r = i.responses.get(True, 100000000000)
except KeyboardInterrupt:
break
if r.get('method') == 'blockchain.numblocks.subscribe':
print r.get('result')
Jump to Line
Something went wrong with that request. Please try again.