aboutsummaryrefslogtreecommitdiff
path: root/qa
diff options
context:
space:
mode:
authorJeff Garzik <jgarzik@bitpay.com>2015-08-15 16:09:06 -0400
committerJeff Garzik <jgarzik@bitpay.com>2015-08-15 16:09:06 -0400
commit6feeec1ec5fbadc5c77d1bbf6511d021e8fc73d1 (patch)
tree558602b33381fadbb911643a38fffabc308f7c97 /qa
parentddd8d80c63182aefea56abf743bb9199d9602544 (diff)
parent70180b2e576ebcb675c905ef4bd9d5b4fd378b6c (diff)
downloadbitcoin-6feeec1ec5fbadc5c77d1bbf6511d021e8fc73d1.tar.xz
Merge pull request #6013
Diffstat (limited to 'qa')
-rwxr-xr-xqa/rpc-tests/rest.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/qa/rpc-tests/rest.py b/qa/rpc-tests/rest.py
index b0cde7268e..2da5219507 100755
--- a/qa/rpc-tests/rest.py
+++ b/qa/rpc-tests/rest.py
@@ -292,6 +292,19 @@ class RESTTest (BitcoinTestFramework):
txs.append(self.nodes[0].sendtoaddress(self.nodes[2].getnewaddress(), 11))
self.sync_all()
+ # check that there are exactly 3 transactions in the TX memory pool before generating the block
+ json_string = http_get_call(url.hostname, url.port, '/rest/mempool/info'+self.FORMAT_SEPARATOR+'json')
+ json_obj = json.loads(json_string)
+ assert_equal(json_obj['size'], 3)
+ # the size of the memory pool should be greater than 3x ~100 bytes
+ assert_greater_than(json_obj['bytes'], 300)
+
+ # check that there are our submitted transactions in the TX memory pool
+ json_string = http_get_call(url.hostname, url.port, '/rest/mempool/contents'+self.FORMAT_SEPARATOR+'json')
+ json_obj = json.loads(json_string)
+ for tx in txs:
+ assert_equal(tx in json_obj, True)
+
# now mine the transactions
newblockhash = self.nodes[1].generate(1)
self.sync_all()