resolve fixmes in tool_wallet.py: wallet file shasum unchanged for both legacy and descriptor wallets. replaceable=True must be set explicitly in sendtoaddress as walletrbf=0 is set by default in the test_framework wallet config (test_framework/util.py:421)

(cherry picked from commit 445a913b19ee55cc7560e693445defd531b0b7d2)
This commit is contained in:
Tom Trevethan 2025-12-16 14:56:44 +00:00 committed by Byron Hambly
parent dd0b0f74a9
commit 4bbee87c21
No known key found for this signature in database
GPG key ID: DE8F6EA20A661697

View file

@ -258,8 +258,7 @@ class ToolWalletTest(BitcoinTestFramework):
# TODO: Wallet tool info should not write to the wallet file.
# This assertion should be uncommented and succeed:
# assert_equal(timestamp_before, timestamp_after)
if not self.options.descriptors: # ELEMENTS FIXME
assert_equal(shasum_before, shasum_after)
assert_equal(shasum_before, shasum_after)
self.log.debug('Wallet file shasum unchanged\n')
def test_tool_wallet_create_on_existing_wallet(self):
@ -409,7 +408,7 @@ class ToolWalletTest(BitcoinTestFramework):
self.generate(self.nodes[0], 1)
# parent tx
parent_txid = wallet.sendtoaddress(wallet.getnewaddress(), 9, replaceable=True) # ELEMENTS FIXME: replaceable should be true by default, investigate
parent_txid = wallet.sendtoaddress(wallet.getnewaddress(), 9, replaceable=True) # ELEMENTS: walletrbf=0 by default in test_framework wallet config
parent_txid_bytes = bytes.fromhex(parent_txid)[::-1]
conflict_utxo = wallet.gettransaction(txid=parent_txid, verbose=True)["decoded"]["vin"][0]
value = sum([out["value"] for out in wallet.gettransaction(txid=parent_txid, verbose=True)["decoded"]["vout"]]) # ELEMENTS