mirror of
https://github.com/bitcoin/bitcoin.git
synced 2024-11-20 10:38:42 +01:00
Add WALLET_FLAG_DESCRIPTORS
This commit is contained in:
parent
6b8119af53
commit
96accc73f0
@ -2452,6 +2452,7 @@ static UniValue getwalletinfo(const JSONRPCRequest& request)
|
||||
{RPCResult::Type::NUM, "duration", "elapsed seconds since scan start"},
|
||||
{RPCResult::Type::NUM, "progress", "scanning progress percentage [0.0, 1.0]"},
|
||||
}},
|
||||
{RPCResult::Type::BOOL, "descriptors", "whether this wallet uses descriptors for scriptPubKey management"},
|
||||
}},
|
||||
},
|
||||
RPCExamples{
|
||||
@ -2505,6 +2506,7 @@ static UniValue getwalletinfo(const JSONRPCRequest& request)
|
||||
} else {
|
||||
obj.pushKV("scanning", false);
|
||||
}
|
||||
obj.pushKV("descriptors", pwallet->IsWalletFlagSet(WALLET_FLAG_DESCRIPTORS));
|
||||
return obj;
|
||||
}
|
||||
|
||||
|
@ -111,7 +111,8 @@ static constexpr uint64_t KNOWN_WALLET_FLAGS =
|
||||
WALLET_FLAG_AVOID_REUSE
|
||||
| WALLET_FLAG_BLANK_WALLET
|
||||
| WALLET_FLAG_KEY_ORIGIN_METADATA
|
||||
| WALLET_FLAG_DISABLE_PRIVATE_KEYS;
|
||||
| WALLET_FLAG_DISABLE_PRIVATE_KEYS
|
||||
| WALLET_FLAG_DESCRIPTORS;
|
||||
|
||||
static constexpr uint64_t MUTABLE_WALLET_FLAGS =
|
||||
WALLET_FLAG_AVOID_REUSE;
|
||||
@ -121,6 +122,7 @@ static const std::map<std::string,WalletFlags> WALLET_FLAG_MAP{
|
||||
{"blank", WALLET_FLAG_BLANK_WALLET},
|
||||
{"key_origin_metadata", WALLET_FLAG_KEY_ORIGIN_METADATA},
|
||||
{"disable_private_keys", WALLET_FLAG_DISABLE_PRIVATE_KEYS},
|
||||
{"descriptor_wallet", WALLET_FLAG_DESCRIPTORS},
|
||||
};
|
||||
|
||||
extern const std::map<uint64_t,std::string> WALLET_FLAG_CAVEATS;
|
||||
|
@ -55,6 +55,9 @@ enum WalletFlags : uint64_t {
|
||||
//! bitcoin from opening the wallet, thinking it was newly created, and
|
||||
//! then improperly reinitializing it.
|
||||
WALLET_FLAG_BLANK_WALLET = (1ULL << 33),
|
||||
|
||||
//! Indicate that this wallet supports DescriptorScriptPubKeyMan
|
||||
WALLET_FLAG_DESCRIPTORS = (1ULL << 34),
|
||||
};
|
||||
|
||||
//! Get the path of the wallet directory.
|
||||
|
Loading…
Reference in New Issue
Block a user