diff options
author | MarcoFalke <*~=`'#}+{/-|&$^_@721217.xyz> | 2024-02-14 17:10:34 +0100 |
---|---|---|
committer | MarcoFalke <*~=`'#}+{/-|&$^_@721217.xyz> | 2024-02-15 10:56:01 +0100 |
commit | fa2a4fdef779b01e847def5985deafedc6dd3da8 (patch) | |
tree | c8e275c0c7f3eaa1b42933f332602d6b2be9b320 /test/functional/mempool_accept.py | |
parent | fade94d11a5b93113975c4b2f62a357a70d03191 (diff) |
rpc: Fixed signed integer overflow for large feerates
Diffstat (limited to 'test/functional/mempool_accept.py')
-rwxr-xr-x | test/functional/mempool_accept.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test/functional/mempool_accept.py b/test/functional/mempool_accept.py index 8f3aec96a7..538e1fe053 100755 --- a/test/functional/mempool_accept.py +++ b/test/functional/mempool_accept.py @@ -90,9 +90,17 @@ class MempoolAcceptanceTest(BitcoinTestFramework): txid_in_block = self.wallet.sendrawtransaction(from_node=node, tx_hex=raw_tx_in_block) self.generate(node, 1) self.mempool_size = 0 + # Also check feerate. 1BTC/kvB fails + assert_raises_rpc_error(-8, "Fee rates larger than or equal to 1BTC/kvB are not accepted", lambda: self.check_mempool_result( + result_expected=None, + rawtxs=[raw_tx_in_block], + maxfeerate=1, + )) + # ... 0.99 passes self.check_mempool_result( result_expected=[{'txid': txid_in_block, 'allowed': False, 'reject-reason': 'txn-already-known'}], rawtxs=[raw_tx_in_block], + maxfeerate=0.99, ) self.log.info('A transaction not in the mempool') |