Skip to content

Commit 6acba84

Browse files
author
MacroFake
committed
Merge bitcoin/bitcoin#25358: test: passing a value below 5 MB to -maxmempool should throw an error
216c9b0 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 216c9b0 furszy: Code review ACK 216c9b0 Tree-SHA512: 0c8fdcefb85e3dabb986a6294ad18503168a04246926614cbfa2d09d9e997312c937b01994f2999b1dc583e2eac5cdb8058bd58577baeb3eb23fdc690400cab9
2 parents 26ec2f2 + 216c9b0 commit 6acba84

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

test/functional/mempool_limit.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,10 @@ def run_test(self):
7777
self.log.info('Create a mempool tx that will not pass mempoolminfee')
7878
assert_raises_rpc_error(-26, "mempool min fee not met", miniwallet.send_self_transfer, from_node=node, fee_rate=relayfee)
7979

80+
self.log.info('Test passing a value below the minimum (5 MB) to -maxmempool throws an error')
81+
self.stop_node(0)
82+
self.nodes[0].assert_start_raises_init_error(["-maxmempool=4"], "Error: -maxmempool must be at least 5 MB")
83+
8084

8185
if __name__ == '__main__':
8286
MempoolLimitTest().main()

0 commit comments

Comments
 (0)