aboutsummaryrefslogtreecommitdiff
path: root/qa/rpc-tests/getblocktemplate_proposals.py
diff options
context:
space:
mode:
authorJoao Fonseca <jpdf.fonseca@gmail.com>2016-04-19 12:22:11 +0100
committerJoao Fonseca <jpdf.fonseca@gmail.com>2016-04-19 12:29:19 +0100
commitfa942c755ab513829dcab27487ba1e7ab5a806ee (patch)
tree0cc57391104a3c1c1e0aea1a937a8565160a0548 /qa/rpc-tests/getblocktemplate_proposals.py
parent187186b0fe039010ea4b81edb671b9bdfc63d29a (diff)
downloadbitcoin-fa942c755ab513829dcab27487ba1e7ab5a806ee.tar.xz
Move method to check matches within arrays on util.py
Diffstat (limited to 'qa/rpc-tests/getblocktemplate_proposals.py')
-rwxr-xr-xqa/rpc-tests/getblocktemplate_proposals.py22
1 files changed, 0 insertions, 22 deletions
diff --git a/qa/rpc-tests/getblocktemplate_proposals.py b/qa/rpc-tests/getblocktemplate_proposals.py
index 07bfe69c6d..be119031ba 100755
--- a/qa/rpc-tests/getblocktemplate_proposals.py
+++ b/qa/rpc-tests/getblocktemplate_proposals.py
@@ -10,28 +10,6 @@ from binascii import a2b_hex, b2a_hex
from hashlib import sha256
from struct import pack
-
-def check_array_result(object_array, to_match, expected):
- """
- Pass in array of JSON objects, a dictionary with key/value pairs
- to match against, and another dictionary with expected key/value
- pairs.
- """
- num_matched = 0
- for item in object_array:
- all_match = True
- for key,value in to_match.items():
- if item[key] != value:
- all_match = False
- if not all_match:
- continue
- for key,value in expected.items():
- if item[key] != value:
- raise AssertionError("%s : expected %s=%s"%(str(item), str(key), str(value)))
- num_matched = num_matched+1
- if num_matched == 0:
- raise AssertionError("No objects matched %s"%(str(to_match)))
-
def b2x(b):
return b2a_hex(b).decode('ascii')