diff options
author | glozow <gzhao408@berkeley.edu> | 2021-02-11 10:50:45 -0800 |
---|---|---|
committer | glozow <gzhao408@berkeley.edu> | 2021-05-24 15:45:01 +0100 |
commit | 9ede34a6f20378e86c5289ebd20dd394a5915123 (patch) | |
tree | d9fed6c6596a26580eb54f6449c5b697f44ab7a0 /test/functional | |
parent | ae8e6df709ff3d52b8e9918e09cacb64f83ae379 (diff) |
[rpc] allow multiple txns in testmempoolaccept
Only allow "packages" with no conflicts, sorted in order of dependency,
and no more than 25 for now. Note that these groups of transactions
don't necessarily need to adhere to some strict definition of a package
or have any dependency relationships. Clients are free to pass in a
batch of 25 unrelated transactions if they want to.
Diffstat (limited to 'test/functional')
-rwxr-xr-x | test/functional/mempool_accept.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/test/functional/mempool_accept.py b/test/functional/mempool_accept.py index c4002f524a..12aac3ab65 100755 --- a/test/functional/mempool_accept.py +++ b/test/functional/mempool_accept.py @@ -67,7 +67,8 @@ class MempoolAcceptanceTest(BitcoinTestFramework): self.log.info('Should not accept garbage to testmempoolaccept') assert_raises_rpc_error(-3, 'Expected type array, got string', lambda: node.testmempoolaccept(rawtxs='ff00baar')) - assert_raises_rpc_error(-8, 'Array must contain exactly one raw transaction for now', lambda: node.testmempoolaccept(rawtxs=['ff00baar', 'ff22'])) + assert_raises_rpc_error(-8, 'Array must contain between 1 and 25 transactions.', lambda: node.testmempoolaccept(rawtxs=['ff22']*26)) + assert_raises_rpc_error(-8, 'Array must contain between 1 and 25 transactions.', lambda: node.testmempoolaccept(rawtxs=[])) assert_raises_rpc_error(-22, 'TX decode failed', lambda: node.testmempoolaccept(rawtxs=['ff00baar'])) self.log.info('A transaction already in the blockchain') |