wallet, test: add wallet_deprecated_rbf.py for walletrbf deprecated keys & options
What changed, and why it matters
This commit only adds a new automated test file and registers it in the test runner. It checks that two old wallet/RBF-related command-line options still behave as documented while they are being phased out. There is no change to the actual Bitcoin Core software that users run, so it cannot introduce a security vulnerability or fix one.
No security action needed. Review as a normal test addition if desired.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The diff adds test/functional/wallet_deprecated_rbf.py, a functional test that exercises the deprecated -walletrbf startup option and deprecatedrpc=bip125 RPC flag. It restarts a node with those options, creates a wallet, sends a transaction, verifies the bip125-replaceable field is present and set to ‘no’, and checks for the expected deprecation warning on stderr. The test is added to BASE_SCRIPTS in test_runner.py. No production code is modified.
Changed components
test/functional/wallet_deprecated_rbf.pytest/functional/test_runner.pyInspect captured patch +38 / −0
diff --git a/test/functional/test_runner.py b/test/functional/test_runner.py
index 698742bc..2b2de76c 100755
--- a/test/functional/test_runner.py
+++ b/test/functional/test_runner.py
@@ -151,6 +151,7 @@ BASE_SCRIPTS = [
'wallet_listtransactions.py',
'wallet_miniscript.py',
# vv Tests less than 30s vv
+ 'wallet_deprecated_rbf.py',
'p2p_invalid_messages.py',
'rpc_createmultisig.py',
'p2p_timeouts.py --v1transport',
diff --git a/test/functional/wallet_deprecated_rbf.py b/test/functional/wallet_deprecated_rbf.py
new file mode 100755
index 00000000..e1085143
--- /dev/null
+++ b/test/functional/wallet_deprecated_rbf.py
@@ -0,0 +1,37 @@
+#!/usr/bin/env python3
+# Copyright (c) 2026-present The Bitcoin Core developers
+# Distributed under the MIT software license, see the accompanying
+# file COPYING or http://www.opensource.org/licenses/mit-license.php.
+"""Test deprecation of RPC calls."""
+from test_framework.util import assert_equal
+from test_framework.test_framework import BitcoinTestFramework
+
+'''
+This test exercises the deprecatedrpc=bip125 flag and deprecated -walletrbf options
+and should be removed when the options are removed post deprecation.
+'''
+class WalletDeprecatedRBFTest(BitcoinTestFramework):
+ def set_test_params(self):
+ self.num_nodes = 1
+ self.setup_clean_chain = True
+ self.extra_args = [[]]
+
+ def skip_test_if_missing_module(self):
+ self.skip_if_no_wallet()
+
+ def run_test(self):
+ self.log.info("Test -deprecatedrpc=bip125 and -walletrbf startup option")
+
+ self.restart_node(0, extra_args=["-walletrbf=0", "-deprecatedrpc=bip125"])
+ node = self.nodes[0]
+ node.createwallet("deprecated_optinrbf")
+ wallet = node.get_wallet_rpc("deprecated_optinrbf")
+ self.generatetoaddress(node, nblocks=101, address=wallet.getnewaddress(), sync_fun=self.no_op)
+ tx = wallet.gettransaction(wallet.sendall(recipients=[wallet.getnewaddress()])["txid"])
+ assert_equal("bip125-replaceable" in tx, True)
+ assert_equal(tx["bip125-replaceable"], "no")
+ self.stop_node(0, expected_stderr="Warning: -walletrbf is deprecated and will be fully removed in the next release.")
+
+
+if __name__ == '__main__':
+ WalletDeprecatedRBFTest(__file__).main()
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.