aboutsummaryrefslogtreecommitdiff
path: root/qa/rpc-tests/test_framework/util.py
diff options
context:
space:
mode:
authorSuhas Daftuar <sdaftuar@gmail.com>2016-04-07 14:54:50 -0400
committerSuhas Daftuar <sdaftuar@gmail.com>2016-04-07 14:54:50 -0400
commit5cb1d8a2071d05beb9907a423178895fd8a5c359 (patch)
treeed8f8c741be1cf7cab6a1b1a86626ab852f23a8b /qa/rpc-tests/test_framework/util.py
parente4ba9f6b0402cf7a2ad0d74f617c434a26c6e124 (diff)
downloadbitcoin-5cb1d8a2071d05beb9907a423178895fd8a5c359.tar.xz
Tests: move get_bip9_status to util.py
Diffstat (limited to 'qa/rpc-tests/test_framework/util.py')
-rw-r--r--qa/rpc-tests/test_framework/util.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/qa/rpc-tests/test_framework/util.py b/qa/rpc-tests/test_framework/util.py
index f069c32a60..d9fe0f75f2 100644
--- a/qa/rpc-tests/test_framework/util.py
+++ b/qa/rpc-tests/test_framework/util.py
@@ -545,3 +545,10 @@ def create_lots_of_big_transactions(node, txouts, utxos, fee):
txid = node.sendrawtransaction(signresult["hex"], True)
txids.append(txid)
return txids
+
+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)