wallet, test: remove -walletrbf startup option from rpc_psbt.py
What changed, and why it matters
This commit only changes Bitcoin Core's own test code. It removes the obsolete -walletrbf startup option from two functional tests and adds a missing PSBT v2 field (fallback locktime) to a test helper that creates blank PSBTs. There is no change to production wallet or node code, so it does not affect real users' funds, transactions, or network security.
No security action required; this is a routine test-maintenance commit.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The patch is confined to test/functional/rpc_psbt.py, test/functional/wallet_send.py, and test/functional/test_framework/psbt.py. It drops -walletrbf from node extra_args and removes a test assertion that verified sequence numbers for a node started with -walletrbf=0. In psbt.py’s make_blank() helper it now copies PSBT_GLOBAL_FALLBACK_LOCKTIME into the blanked PSBT v2 structure. No consensus, P2P, wallet, or RPC runtime logic is modified.
Changed components
test/functional/rpc_psbt.pytest/functional/wallet_send.pytest/functional/test_framework/psbt.pyInspect captured patch +4 / −11
diff --git a/test/functional/rpc_psbt.py b/test/functional/rpc_psbt.py
index a480cccc..37218f32 100755
--- a/test/functional/rpc_psbt.py
+++ b/test/functional/rpc_psbt.py
@@ -71,8 +71,8 @@ class PSBTTest(BitcoinTestFramework):
def set_test_params(self):
self.num_nodes = 3
self.extra_args = [
- ["-walletrbf=1"],
- ["-walletrbf=0", "-changetype=legacy"],
+ [],
+ ["-changetype=legacy"],
[]
]
# whitelist peers to speed up tx relay / mempool sync
@@ -881,14 +881,6 @@ class PSBTTest(BitcoinTestFramework):
assert "bip32_derivs" in psbt_in
assert_equal(decoded_psbt["fallback_locktime"], 0)
- # Same construction without optional arguments, for a node with -walletrbf=0
- unspent1 = self.nodes[1].listunspent()[0]
- psbtx_info = self.nodes[1].walletcreatefundedpsbt([{"txid":unspent1["txid"], "vout":unspent1["vout"]}], [{self.nodes[2].getnewaddress():unspent1["amount"]+1}], block_height, {"add_inputs": True})
- decoded_psbt = self.nodes[1].decodepsbt(psbtx_info["psbt"])
- for psbt_in in decoded_psbt["inputs"]:
- assert_greater_than(psbt_in["sequence"], MAX_BIP125_RBF_SEQUENCE)
- assert "bip32_derivs" in psbt_in
-
# Make sure change address wallet does not have P2SH innerscript access to results in success
# when attempting BnB coin selection
self.nodes[0].walletcreatefundedpsbt([], [{self.nodes[2].getnewaddress():unspent["amount"]+1}], block_height+2, {"changeAddress":self.nodes[1].getnewaddress()}, False)
diff --git a/test/functional/test_framework/psbt.py b/test/functional/test_framework/psbt.py
index b43669a5..a025790f 100644
--- a/test/functional/test_framework/psbt.py
+++ b/test/functional/test_framework/psbt.py
@@ -168,6 +168,7 @@ class PSBT:
PSBT_GLOBAL_INPUT_COUNT: self.g.map[PSBT_GLOBAL_INPUT_COUNT],
PSBT_GLOBAL_OUTPUT_COUNT: self.g.map[PSBT_GLOBAL_OUTPUT_COUNT],
PSBT_GLOBAL_VERSION: self.g.map[PSBT_GLOBAL_VERSION],
+ PSBT_GLOBAL_FALLBACK_LOCKTIME: self.g.map[PSBT_GLOBAL_FALLBACK_LOCKTIME],
})
new_i = []
diff --git a/test/functional/wallet_send.py b/test/functional/wallet_send.py
index b1520205..ffd3e46d 100755
--- a/test/functional/wallet_send.py
+++ b/test/functional/wallet_send.py
@@ -31,7 +31,7 @@ class WalletSendTest(BitcoinTestFramework):
# whitelist peers to speed up tx relay / mempool sync
self.noban_tx_relay = True
self.supports_cli = False
- self.extra_args = [["-walletrbf=1", "-datacarriersize=16", "-deprecatedrpc=bip125"]] * self.num_nodes
+ self.extra_args = [["-datacarriersize=16", "-deprecatedrpc=bip125"]] * self.num_nodes
getcontext().prec = 8 # Satoshi precision for Decimal
def skip_test_if_missing_module(self):
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.