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.

21 lines
435 B

11 years ago
#!/usr/bin/env python
import util, sys
11 years ago
try:
tx = sys.argv[1]
except:
print "usage: txradar txid"
sys.exit(1)
peers = util.get_peers()
results = util.send_request(peers, {'method':'blockchain.transaction.get','params':[tx]})
11 years ago
r1 = []
r2 = []
for k, v in results.items():
(r1 if v else r2).append(k)
11 years ago
print "Received %d answers"%len(results)
print "Propagation rate: %.1f percent" % (len(r1) *100./(len(r1)+ len(r2)))
11 years ago