test: check_mempool_result negative feerate

Adds test in mempool_accept to check if a negative maxfeerate is inputed
into check_mempool_result, asserts "Amount out of range" error message
and -3 error code
pull/29459/head
kevkevin 9 months ago
parent 45b2a91897
commit bf264e0598
No known key found for this signature in database
GPG Key ID: B4346A15246A925D

@ -96,6 +96,12 @@ class MempoolAcceptanceTest(BitcoinTestFramework):
rawtxs=[raw_tx_in_block],
maxfeerate=1,
))
# Check negative feerate
assert_raises_rpc_error(-3, "Amount out of range", lambda: self.check_mempool_result(
result_expected=None,
rawtxs=[raw_tx_in_block],
maxfeerate=-0.01,
))
# ... 0.99 passes
self.check_mempool_result(
result_expected=[{'txid': txid_in_block, 'allowed': False, 'reject-reason': 'txn-already-known'}],

Loading…
Cancel
Save