You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
14 lines
395 B
14 lines
395 B
#!/usr/bin/env python3
|
|
|
|
import util
|
|
|
|
from electrum.network import filter_protocol
|
|
from electrum.blockchain import hash_header
|
|
|
|
peers = util.get_peers()
|
|
peers = filter_protocol(peers, 's')
|
|
|
|
results = util.send_request(peers, 'blockchain.headers.subscribe', [])
|
|
|
|
for n,v in sorted(results.items(), key=lambda x:x[1].get('block_height')):
|
|
print("%60s"%n, v.get('block_height'), hash_header(v))
|
|
|