Skip to content

Commit a33ee84

Browse files
committed
[functional test] deprecated bip125-replaceable field
1 parent a50a332 commit a33ee84

File tree

1 file changed

+16
-3
lines changed

1 file changed

+16
-3
lines changed

test/functional/rpc_deprecated.py

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,13 @@
44
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
55
"""Test deprecation of RPC calls."""
66
from test_framework.test_framework import BitcoinTestFramework
7+
from test_framework.util import assert_equal
8+
from test_framework.wallet import MiniWallet
79

810
class DeprecatedRpcTest(BitcoinTestFramework):
911
def set_test_params(self):
1012
self.num_nodes = 2
11-
self.setup_clean_chain = True
12-
self.extra_args = [[], ['-deprecatedrpc=bumpfee']]
13+
self.extra_args = [[], ['-deprecatedrpc=bip125']]
1314

1415
def run_test(self):
1516
# This test should be used to verify correct behaviour of deprecated
@@ -23,7 +24,19 @@ def run_test(self):
2324
# assert_raises_rpc_error(-32, 'The wallet generate rpc method is deprecated', self.nodes[0].rpc.generate, 1)
2425
# self.nodes[1].generate(1)
2526

26-
self.log.info("No tested deprecated RPC methods")
27+
self.log.info("Test deprecated fields for RBF signaling")
28+
self.wallet = MiniWallet(self.nodes[0])
29+
self.wallet.scan_blocks(start=76, num=1)
30+
txid = self.wallet.send_self_transfer(from_node=self.nodes[0])["txid"]
31+
self.sync_all()
32+
node0_entry = self.nodes[0].getmempoolentry(txid)
33+
assert "replaceable" in node0_entry
34+
assert "bip125-replaceable" not in node0_entry
35+
node1_entry = self.nodes[1].getmempoolentry(txid)
36+
assert "replaceable" in node1_entry
37+
assert "bip125-replaceable" in node1_entry
38+
assert_equal(node1_entry["replaceable"], node1_entry["bip125-replaceable"])
39+
2740

2841
if __name__ == '__main__':
2942
DeprecatedRpcTest().main()

0 commit comments

Comments
 (0)