getblockchaininfo: make bip9_softforks an object, not an array.

This commit is contained in:
Rusty Russell
2016-04-12 15:44:18 +09:30
committed by lateminer
parent 06eff6304b
commit b7f1e510a2
3 changed files with 8 additions and 17 deletions

View File

@@ -493,7 +493,4 @@ def create_lots_of_big_transactions(node, txouts, utxos, fee):
def get_bip9_status(node, key):
info = node.getblockchaininfo()
for row in info['bip9_softforks']:
if row['id'] == key:
return row
raise IndexError ('key:"%s" not found' % key)
return info['bip9_softforks'][key]