diff options
author | Ryan Ofsky <ryan@ofsky.org> | 2023-06-08 07:03:22 -0400 |
---|---|---|
committer | Andrew Chow <github@achow101.com> | 2023-06-13 15:11:41 -0400 |
commit | cdba23db353a1beff831ff4fc83d01ed64e8c2a9 (patch) | |
tree | 03b0a6976e7fcb8a6bffae8a1b2602345e0cb868 /src | |
parent | 43310200dce8d450ae5808824af788cefaa5d6db (diff) |
wallet: Document blank flag use in descriptor wallets
Diffstat (limited to 'src')
-rw-r--r-- | src/wallet/walletutil.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/wallet/walletutil.h b/src/wallet/walletutil.h index f639078de5..37847b64ef 100644 --- a/src/wallet/walletutil.h +++ b/src/wallet/walletutil.h @@ -53,10 +53,18 @@ enum WalletFlags : uint64_t { //! Flag set when a wallet contains no HD seed and no private keys, scripts, //! addresses, and other watch only things, and is therefore "blank." //! - //! The only function this flag serves is to distinguish a blank wallet from + //! The main function this flag serves is to distinguish a blank wallet from //! a newly created wallet when the wallet database is loaded, to avoid //! initialization that should only happen on first run. //! + //! A secondary function of this flag, which applies to descriptor wallets + //! only, is to serve as an ongoing indication that descriptors in the + //! wallet should be created manually, and that the wallet should not + //! generate automatically generate new descriptors if it is later + //! encrypted. To support this behavior, descriptor wallets unlike legacy + //! wallets do not automatically unset the BLANK flag when things are + //! imported. + //! //! This flag is also a mandatory flag to prevent previous versions of //! bitcoin from opening the wallet, thinking it was newly created, and //! then improperly reinitializing it. |