Skip to content

Commit 3d255df

Browse files
committed
Merge bitcoin#29459: test: check_mempool_result negative feerate
bf264e0 test: check_mempool_result negative feerate (kevkevin) Pull request description: Adds test coverage in `mempool_accept.py` to check if a negative `maxfeerate` is input into `check_mempool_result` Asserts "Amount out of range" error message and `-3` error code Motivated by this [comment](https://github.com/bitcoin/bitcoin/pull/29434/files#r1491112250) ACKs for top commit: maflcko: lgtm ACK bf264e0 brunoerg: nice, utACK bf264e0 davidgumberg: Looks great, ACK bitcoin@bf264e0 Tree-SHA512: 58931b774cc887c616f2fd91af3ee65cc5db55acd8e2875c76de448c80bd4e020b057c5f4f85556431377f0d0e7553771fb285d1ec20cf64f64ec92a47776b78
2 parents e1ce5b8 + bf264e0 commit 3d255df

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

test/functional/mempool_accept.py

+6
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,12 @@ def run_test(self):
9696
rawtxs=[raw_tx_in_block],
9797
maxfeerate=1,
9898
))
99+
# Check negative feerate
100+
assert_raises_rpc_error(-3, "Amount out of range", lambda: self.check_mempool_result(
101+
result_expected=None,
102+
rawtxs=[raw_tx_in_block],
103+
maxfeerate=-0.01,
104+
))
99105
# ... 0.99 passes
100106
self.check_mempool_result(
101107
result_expected=[{'txid': txid_in_block, 'allowed': False, 'reject-reason': 'txn-already-known'}],

0 commit comments

Comments
 (0)