-WIP-electrum-btcp/client/blocks

11 lines
266 B
Plaintext
Raw Normal View History

2012-03-17 04:51:16 -07:00
#!/usr/bin/env python
import socket, time, interface
2012-03-24 07:23:33 -07:00
i = interface.AsynchronousInterface('ecdsa.org', 50001)
2012-03-17 04:52:16 -07:00
i.start_session([],"blocks")
2012-03-17 04:51:16 -07:00
while True:
2012-03-24 07:23:33 -07:00
r = i.responses.get(True, 100000000000)
if r.get('method')=='numblocks.subscribe': print r.get('result')