diff options
author | glozow <gzhao408@berkeley.edu> | 2021-04-05 13:15:56 -0700 |
---|---|---|
committer | glozow <gzhao408@berkeley.edu> | 2021-05-24 15:48:32 +0100 |
commit | 13650fe2e527bf0cf5d977bf5f3f1563b853ecdc (patch) | |
tree | dea774530d56871d155998c466a5fbc33951e5f1 /test/functional/rpc_packages.py | |
parent | 9ef643e21b44f99f4bce54077788d0ad4d81f7cd (diff) |
[policy] detect unsorted packages
Diffstat (limited to 'test/functional/rpc_packages.py')
-rwxr-xr-x | test/functional/rpc_packages.py | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/test/functional/rpc_packages.py b/test/functional/rpc_packages.py index 79e8d8e3ce..3d8d81d6b8 100755 --- a/test/functional/rpc_packages.py +++ b/test/functional/rpc_packages.py @@ -169,10 +169,8 @@ class RPCPackagesTest(BitcoinTestFramework): chain_txns.append(tx) self.log.info("Check that testmempoolaccept requires packages to be sorted by dependency") - testres_multiple_unsorted = node.testmempoolaccept(rawtxs=chain_hex[::-1]) - assert_equal(testres_multiple_unsorted, - [{"txid": chain_txns[-1].rehash(), "wtxid": chain_txns[-1].getwtxid(), "allowed": False, "reject-reason": "missing-inputs"}] - + [{"txid": tx.rehash(), "wtxid": tx.getwtxid()} for tx in chain_txns[::-1]][1:]) + assert_equal(node.testmempoolaccept(rawtxs=chain_hex[::-1]), + [{"txid": tx.rehash(), "wtxid": tx.getwtxid(), "package-error": "package-not-sorted"} for tx in chain_txns[::-1]]) self.log.info("Testmempoolaccept a chain of 25 transactions") testres_multiple = node.testmempoolaccept(rawtxs=chain_hex) |