mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-12-01 00:10:44 +01:00
rpc: Fixed signed integer overflow for large feerates
This commit is contained in:
@@ -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')
|
||||
|
||||
Reference in New Issue
Block a user