aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorMacroFake <falke.marco@gmail.com>2022-06-15 19:24:03 +0200
committerMacroFake <falke.marco@gmail.com>2022-06-15 19:24:14 +0200
commit6acba8460361b2dabe1f097ca652fc9da9e18ce4 (patch)
tree9252f7ccd1afa7448d38ed6f7f8b4efe533af749 /test
parent26ec2f2d6bb12525044b6d09422b42715fc09319 (diff)
parent216c9b00ec6f8dca815fa5a308abaf4c34674b41 (diff)
downloadbitcoin-6acba8460361b2dabe1f097ca652fc9da9e18ce4.tar.xz
Merge bitcoin/bitcoin#25358: test: passing a value below 5 MB to -maxmempool should throw an error
216c9b00ec6f8dca815fa5a308abaf4c34674b41 test: passing a value below 5 MB to -maxmempool should throw an error (brunoerg) Pull request description: This PR adds test coverage for the following init error: https://github.com/bitcoin/bitcoin/blob/5174a139c92c1238f9700d06e362dc628d81a0a9/src/init.cpp#L931-L935 By default, the minimum value is 5 MB. See: https://github.com/bitcoin/bitcoin/blob/master/doc/reduce-memory.md#memory-pool ACKs for top commit: laanwj: Code review ACK 216c9b00ec6f8dca815fa5a308abaf4c34674b41 furszy: Code review ACK 216c9b00 Tree-SHA512: 0c8fdcefb85e3dabb986a6294ad18503168a04246926614cbfa2d09d9e997312c937b01994f2999b1dc583e2eac5cdb8058bd58577baeb3eb23fdc690400cab9
Diffstat (limited to 'test')
-rwxr-xr-xtest/functional/mempool_limit.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/test/functional/mempool_limit.py b/test/functional/mempool_limit.py
index 88fb09e08b..e92f73304b 100755
--- a/test/functional/mempool_limit.py
+++ b/test/functional/mempool_limit.py
@@ -77,6 +77,10 @@ class MempoolLimitTest(BitcoinTestFramework):
self.log.info('Create a mempool tx that will not pass mempoolminfee')
assert_raises_rpc_error(-26, "mempool min fee not met", miniwallet.send_self_transfer, from_node=node, fee_rate=relayfee)
+ self.log.info('Test passing a value below the minimum (5 MB) to -maxmempool throws an error')
+ self.stop_node(0)
+ self.nodes[0].assert_start_raises_init_error(["-maxmempool=4"], "Error: -maxmempool must be at least 5 MB")
+
if __name__ == '__main__':
MempoolLimitTest().main()