test: Check that the correct versions are logged on wallet load

This commit is contained in:
Ava Chow
2025-05-18 11:55:18 -07:00
parent 359ecd3704
commit 39a483c8e9

View File

@@ -165,6 +165,18 @@ class CreateWalletTest(BitcoinTestFramework):
self.log.info("Test that legacy wallets cannot be created")
assert_raises_rpc_error(-4, 'descriptors argument must be set to "true"; it is no longer possible to create a legacy wallet.', self.nodes[0].createwallet, wallet_name="legacy", descriptors=False)
self.log.info("Check that the version number is being logged correctly")
node.createwallet("version_check")
wallet = node.get_wallet_rpc("version_check")
wallet_version = wallet.getwalletinfo()["walletversion"]
client_version = node.getnetworkinfo()["version"]
wallet.unloadwallet()
with node.assert_debug_log(
expected_msgs=[f"Last client version = {client_version}", f"Wallet file version = {wallet_version}"],
unexpected_msgs=["Wallet file version = 10500"]
):
node.loadwallet("version_check")
if __name__ == '__main__':
CreateWalletTest(__file__).main()