mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-12-11 13:13:49 +01:00
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
This commit is contained in:
@@ -96,6 +96,12 @@ class MempoolAcceptanceTest(BitcoinTestFramework):
|
|||||||
rawtxs=[raw_tx_in_block],
|
rawtxs=[raw_tx_in_block],
|
||||||
maxfeerate=1,
|
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
|
# ... 0.99 passes
|
||||||
self.check_mempool_result(
|
self.check_mempool_result(
|
||||||
result_expected=[{'txid': txid_in_block, 'allowed': False, 'reject-reason': 'txn-already-known'}],
|
result_expected=[{'txid': txid_in_block, 'allowed': False, 'reject-reason': 'txn-already-known'}],
|
||||||
|
|||||||
Reference in New Issue
Block a user