Skip to content

Commit 7a4ac71

Browse files
author
MarcoFalke
committed
Merge bitcoin/bitcoin#24936: test: compare /mempool/contents response with getrawmempool RPC
bef6149 test: compare `/mempool/contents` response with `getrawmempool` RPC (brunoerg) 5bc5cba doc: add reference to `getrawmempool` RPC in `/mempool/contents` REST doc (brunoerg) Pull request description: This PR is similar to #24797, it compares `/mempool/contents` REST response with `getrawmempool` RPC (verbose=True) since they use the same `MempoolToJSON` function. Also, adds a reference to `getrawmempool` RPC help to get details about the fields from `/mempool/contents`. ACKs for top commit: 0xB10C: ACK bef6149 Tree-SHA512: b7e9e9c765ee837986ba167b9234a9b95c9ef0a9ebcc2a03d50f6be6d3aba1480bd77c78111d95df1e4023cde6dfc64bf1e7908d9e5b6f96ca46b76611a4a9b4
2 parents 173c796 + bef6149 commit 7a4ac71

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

doc/REST-interface.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,7 @@ Refer to the `getmempoolinfo` RPC help for details.
125125

126126
Returns the transactions in the mempool.
127127
Only supports JSON as output format.
128+
Refer to the `getrawmempool` RPC help for details.
128129

129130
Risks
130131
-------------

test/functional/interface_rest.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -326,6 +326,10 @@ def run_test(self):
326326

327327
# Check that there are our submitted transactions in the TX memory pool
328328
json_obj = self.test_rest_request("/mempool/contents")
329+
raw_mempool_verbose = self.nodes[0].getrawmempool(verbose=True)
330+
331+
assert_equal(json_obj, raw_mempool_verbose)
332+
329333
for i, tx in enumerate(txs):
330334
assert tx in json_obj
331335
assert_equal(json_obj[tx]['spentby'], txs[i + 1:i + 2])

0 commit comments

Comments
 (0)