mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-01-19 05:45:05 +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:
parent
45b2a91897
commit
bf264e0598
@ -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…
Reference in New Issue
Block a user