mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-08-27 20:49:30 +02:00
wallet, rpc: Output wallet flags in getwalletinfo
This commit is contained in:
@@ -104,7 +104,9 @@ class AvoidReuseTest(BitcoinTestFramework):
|
||||
|
||||
# Flags should be node1.avoid_reuse=false, node2.avoid_reuse=true
|
||||
assert_equal(self.nodes[0].getwalletinfo()["avoid_reuse"], False)
|
||||
assert_equal(sorted(self.nodes[0].getwalletinfo()["flags"]), sorted(["descriptor_wallet", "last_hardened_xpub_cached"]))
|
||||
assert_equal(self.nodes[1].getwalletinfo()["avoid_reuse"], True)
|
||||
assert_equal(sorted(self.nodes[1].getwalletinfo()["flags"]), sorted(["descriptor_wallet", "last_hardened_xpub_cached", "avoid_reuse"]))
|
||||
|
||||
self.restart_node(1)
|
||||
self.connect_nodes(0, 1)
|
||||
|
@@ -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)
|
||||
|
Reference in New Issue
Block a user