mirror of
https://github.com/Retropex/bitcoin.git
synced 2025-05-15 04:30:42 +02:00
test: compare /mempool/contents
response with getrawmempool
RPC
This commit is contained in:
parent
5bc5cbaf31
commit
bef61496ab
@ -326,6 +326,10 @@ class RESTTest (BitcoinTestFramework):
|
|||||||
|
|
||||||
# Check that there are our submitted transactions in the TX memory pool
|
# Check that there are our submitted transactions in the TX memory pool
|
||||||
json_obj = self.test_rest_request("/mempool/contents")
|
json_obj = self.test_rest_request("/mempool/contents")
|
||||||
|
raw_mempool_verbose = self.nodes[0].getrawmempool(verbose=True)
|
||||||
|
|
||||||
|
assert_equal(json_obj, raw_mempool_verbose)
|
||||||
|
|
||||||
for i, tx in enumerate(txs):
|
for i, tx in enumerate(txs):
|
||||||
assert tx in json_obj
|
assert tx in json_obj
|
||||||
assert_equal(json_obj[tx]['spentby'], txs[i + 1:i + 2])
|
assert_equal(json_obj[tx]['spentby'], txs[i + 1:i + 2])
|
||||||
|
Loading…
Reference in New Issue
Block a user