1
0
mirror of https://github.com/romanz/electrs.git synced 2024-11-19 01:43:29 +01:00

Update contrib/mempool.py for bitcoind 0.18

This commit is contained in:
Roman Zeyde 2019-05-18 10:35:27 +03:00
parent a2a97c7714
commit 89940cf973
No known key found for this signature in database
GPG Key ID: 87CAE5FA46917CBB

View File

@ -59,7 +59,7 @@ def main():
txids = list(map(lambda a: [a], txids))
entries = d.request('getmempoolentry', txids)
entries = [{'fee': e['fee']*1e8, 'vsize': e['size']} for e in entries]
entries = [{'fee': e['fee']*1e8, 'vsize': e['vsize']} for e in entries]
for e in entries:
e['rate'] = e['fee'] / e['vsize'] # sat/vbyte
entries.sort(key=lambda e: e['rate'], reverse=True)