What changed, and why it matters
This commit only changes Bitcoin Core's internal functional test scripts. It fixes log-message formatting, adjusts test thresholds and comments to match current fee-relay behavior, and adds one extra test case for a v3 transaction package. None of these changes affect the live Bitcoin node software, network protocol, consensus rules, or wallet code that users run.
No security action required. Treat as ordinary test maintenance.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The diff is confined to five Python files under test/functional/. Changes include: correcting f-string format specifiers in feature_rbf.py and mempool_package_rbf.py; adding an additional TRUC/v3 package-submission test in mempool_truc.py; removing an unnecessary rescan and tightening fee-rate boundary conditions in mining_basic.py; and updating bumpfee test values/comments in wallet_bumpfee.py to reflect that the incremental relay fee is size-dependent. No C++/Python node logic is modified.
Changed components
test/functional/feature_rbf.pytest/functional/mempool_package_rbf.pytest/functional/mempool_truc.pytest/functional/mining_basic.pytest/functional/wallet_bumpfee.pyInspect captured patch +14 / −9
diff --git a/test/functional/feature_rbf.py b/test/functional/feature_rbf.py
index 4117326b..86fe2f5b 100755
--- a/test/functional/feature_rbf.py
+++ b/test/functional/feature_rbf.py
@@ -594,7 +594,7 @@ class ReplaceByFeeTest(BitcoinTestFramework):
node = self.nodes[0]
for incremental_setting in (0, 5, 10, 50, 100, 234, 1000, 5000, 21000):
incremental_setting_decimal = incremental_setting / Decimal(COIN)
- self.log.info(f"-> Test -incrementalrelayfee={incremental_setting_decimal:.8f}sat/kvB...")
+ self.log.info(f"-> Test -incrementalrelayfee={incremental_setting:.8f}sat/kvB...")
self.restart_node(0, extra_args=[f"-incrementalrelayfee={incremental_setting_decimal:.8f}", "-persistmempool=0"])
# When incremental relay feerate is higher than min relay feerate, min relay feerate is automatically increased.
diff --git a/test/functional/mempool_package_rbf.py b/test/functional/mempool_package_rbf.py
index 54f3a90c..3eb0abd3 100755
--- a/test/functional/mempool_package_rbf.py
+++ b/test/functional/mempool_package_rbf.py
@@ -168,7 +168,7 @@ class PackageRBFTest(BitcoinTestFramework):
failure_package_hex3, failure_package_txns3 = self.create_simple_package(coin, parent_fee=DEFAULT_FEE, child_fee=DEFAULT_CHILD_FEE + incremental_sats_short)
assert_equal(package_3_size, sum([tx.get_vsize() for tx in failure_package_txns3]))
pkg_results3 = node.submitpackage(failure_package_hex3)
- assert_equal(f"package RBF failed: insufficient anti-DoS fees, rejecting replacement {failure_package_txns3[1].txid_hex}, not enough additional fees to relay; {incremental_sats_short:8f} < {incremental_sats_required:8f}", pkg_results3["package_msg"])
+ assert_equal(f"package RBF failed: insufficient anti-DoS fees, rejecting replacement {failure_package_txns3[1].txid_hex}, not enough additional fees to relay; {incremental_sats_short:.8f} < {incremental_sats_required:.8f}", pkg_results3["package_msg"])
self.assert_mempool_contents(expected=package_txns1)
success_package_hex3, success_package_txns3 = self.create_simple_package(coin, parent_fee=DEFAULT_FEE, child_fee=DEFAULT_CHILD_FEE + incremental_sats_required)
diff --git a/test/functional/mempool_truc.py b/test/functional/mempool_truc.py
index 428bfb0b..562afcd3 100755
--- a/test/functional/mempool_truc.py
+++ b/test/functional/mempool_truc.py
@@ -617,6 +617,10 @@ class MempoolTRUC(BitcoinTestFramework):
assert_greater_than(get_fee(tx_v3_0fee_parent["tx"].get_vsize(), minrelayfeerate), 0)
# Always need to pay at least 1 satoshi for entry, even if minimum feerate is very low
assert_greater_than(total_v3_fee, 0)
+ # Also create a version where the child is at minrelaytxfee
+ tx_v3_child_minrelay = self.wallet.create_self_transfer(utxo_to_spend=tx_v3_0fee_parent["new_utxo"], fee_rate=minrelayfeerate, version=3)
+ result_truc_minrelay = node.submitpackage([tx_v3_0fee_parent["hex"], tx_v3_child_minrelay["hex"]])
+ assert_equal(result_truc_minrelay["package_msg"], "transaction failed")
tx_v2_0fee_parent = self.wallet.create_self_transfer(fee=0, fee_rate=0, confirmed_only=True, version=2)
tx_v2_child = self.wallet.create_self_transfer(utxo_to_spend=tx_v2_0fee_parent["new_utxo"], fee_rate=high_feerate, version=2)
diff --git a/test/functional/mining_basic.py b/test/functional/mining_basic.py
index 4f104359..7e71761a 100755
--- a/test/functional/mining_basic.py
+++ b/test/functional/mining_basic.py
@@ -152,19 +152,20 @@ class MiningTest(BitcoinTestFramework):
blockmintxfee_parameter = f"-blockmintxfee={blockmintxfee_btc_kvb:.8f}"
self.log.info(f"-> Test {blockmintxfee_parameter} ({blockmintxfee_sat_kvb} sat/kvB)...")
self.restart_node(0, extra_args=[blockmintxfee_parameter, '-minrelaytxfee=0', '-persistmempool=0'])
- self.wallet.rescan_utxos() # to avoid spending outputs of txs that are not in mempool anymore after restart
assert_equal(node.getmininginfo()['blockmintxfee'], blockmintxfee_btc_kvb)
# submit one tx with exactly the blockmintxfee rate, and one slightly below
tx_with_min_feerate = self.wallet.send_self_transfer(from_node=node, fee_rate=blockmintxfee_btc_kvb, confirmed_only=True)
assert_equal(tx_with_min_feerate["fee"], get_fee(tx_with_min_feerate["tx"].get_vsize(), blockmintxfee_btc_kvb))
- if blockmintxfee_sat_kvb > 5:
+ if blockmintxfee_sat_kvb >= 10:
lowerfee_btc_kvb = blockmintxfee_btc_kvb - Decimal(10)/COIN # 0.01 sat/vbyte lower
+ assert_greater_than(blockmintxfee_btc_kvb, lowerfee_btc_kvb)
+ assert_greater_than_or_equal(lowerfee_btc_kvb, 0)
tx_below_min_feerate = self.wallet.send_self_transfer(from_node=node, fee_rate=lowerfee_btc_kvb, confirmed_only=True)
assert_equal(tx_below_min_feerate["fee"], get_fee(tx_below_min_feerate["tx"].get_vsize(), lowerfee_btc_kvb))
else: # go below zero fee by using modified fees
tx_below_min_feerate = self.wallet.send_self_transfer(from_node=node, fee_rate=blockmintxfee_btc_kvb, confirmed_only=True)
- node.prioritisetransaction(tx_below_min_feerate["txid"], 0, -1)
+ node.prioritisetransaction(tx_below_min_feerate["txid"], 0, -11)
# check that tx below specified fee-rate is neither in template nor in the actual block
block_template = node.getblocktemplate(NORMAL_GBT_REQUEST_PARAMS)
diff --git a/test/functional/wallet_bumpfee.py b/test/functional/wallet_bumpfee.py
index 097c3957..d3972bef 100755
--- a/test/functional/wallet_bumpfee.py
+++ b/test/functional/wallet_bumpfee.py
@@ -848,12 +848,12 @@ def test_bumpfee_with_feerate_ignores_walletincrementalrelayfee(self, rbf_node,
assert_raises_rpc_error(-8, "Insufficient total fee", rbf_node.bumpfee, tx["txid"], {"fee_rate": 1})
assert_raises_rpc_error(-8, "Insufficient total fee", rbf_node.bumpfee, tx["txid"], {"fee_rate": 2})
- # Ensure you can not fee bump if the fee_rate is more than original fee_rate but the total fee from new fee_rate is
- # less than (original fee + incrementalrelayfee)
- assert_raises_rpc_error(-8, "Insufficient total fee", rbf_node.bumpfee, tx["txid"], {"fee_rate": 2.05})
+ # Ensure you can not fee bump if the fee_rate is more than original fee_rate but the additional fee does
+ # not cover incrementalrelayfee for the size of the replacement transaction
+ assert_raises_rpc_error(-8, "Insufficient total fee", rbf_node.bumpfee, tx["txid"], {"fee_rate": 2.09})
# You can fee bump as long as the new fee set from fee_rate is at least (original fee + incrementalrelayfee)
- rbf_node.bumpfee(tx["txid"], {"fee_rate": 3})
+ rbf_node.bumpfee(tx["txid"], {"fee_rate": 2.1})
self.clear_mempool()
Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.