wallet, rpc: Output wallet flags in getwalletinfo

This commit is contained in:
Ava Chow
2025-05-22 17:29:21 -07:00
parent bc2a26b296
commit 47237cd193
4 changed files with 43 additions and 11 deletions

View File

@@ -44,6 +44,7 @@ class CreateWalletTest(BitcoinTestFramework):
assert_raises_rpc_error(-4, "Error: This wallet has no available keys", w1.getrawchangeaddress)
import_res = w1.importdescriptors([{"desc": w0.getaddressinfo(address1)['desc'], "timestamp": "now"}])
assert_equal(import_res[0]["success"], True)
assert_equal(sorted(w1.getwalletinfo()["flags"]), sorted(["last_hardened_xpub_cached", "descriptor_wallet", "disable_private_keys"]))
self.log.info('Test that private keys cannot be imported')
privkey, pubkey = generate_keypair(wif=True)