diff options
author | MarcoFalke <falke.marco@gmail.com> | 2022-04-21 19:00:57 +0200 |
---|---|---|
committer | MarcoFalke <falke.marco@gmail.com> | 2022-04-21 19:01:00 +0200 |
commit | 7a4ac713aad699435cc3175f1c3b6a5d985442a5 (patch) | |
tree | 96bfad5a641b0a1114eabc10d5a9b99aa0967077 | |
parent | 173c79626867e9f89d49be7dcbb0c2042c480553 (diff) | |
parent | bef61496ab5e12e38ac5794cd0836723af070ab5 (diff) | |
download | bitcoin-7a4ac713aad699435cc3175f1c3b6a5d985442a5.tar.xz |
Merge bitcoin/bitcoin#24936: test: compare `/mempool/contents` response with `getrawmempool` RPC
bef61496ab5e12e38ac5794cd0836723af070ab5 test: compare `/mempool/contents` response with `getrawmempool` RPC (brunoerg)
5bc5cbaf310f60e89c72e8ecf3f6187c85499027 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
-rw-r--r-- | doc/REST-interface.md | 1 | ||||
-rwxr-xr-x | test/functional/interface_rest.py | 4 |
2 files changed, 5 insertions, 0 deletions
diff --git a/doc/REST-interface.md b/doc/REST-interface.md index f11624fd28..4b46f29153 100644 --- a/doc/REST-interface.md +++ b/doc/REST-interface.md @@ -125,6 +125,7 @@ Refer to the `getmempoolinfo` RPC help for details. Returns the transactions in the mempool. Only supports JSON as output format. +Refer to the `getrawmempool` RPC help for details. Risks ------------- diff --git a/test/functional/interface_rest.py b/test/functional/interface_rest.py index 30c9e0c9cd..95dc40cb52 100755 --- a/test/functional/interface_rest.py +++ b/test/functional/interface_rest.py @@ -326,6 +326,10 @@ class RESTTest (BitcoinTestFramework): # Check that there are our submitted transactions in the TX memory pool 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): assert tx in json_obj assert_equal(json_obj[tx]['spentby'], txs[i + 1:i + 2]) |