Skip to content

Commit cdba23d

Browse files
ryanofskyachow101
authored andcommitted
wallet: Document blank flag use in descriptor wallets
1 parent 4331020 commit cdba23d

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

src/wallet/walletutil.h

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,10 +53,18 @@ enum WalletFlags : uint64_t {
5353
//! Flag set when a wallet contains no HD seed and no private keys, scripts,
5454
//! addresses, and other watch only things, and is therefore "blank."
5555
//!
56-
//! The only function this flag serves is to distinguish a blank wallet from
56+
//! The main function this flag serves is to distinguish a blank wallet from
5757
//! a newly created wallet when the wallet database is loaded, to avoid
5858
//! initialization that should only happen on first run.
5959
//!
60+
//! A secondary function of this flag, which applies to descriptor wallets
61+
//! only, is to serve as an ongoing indication that descriptors in the
62+
//! wallet should be created manually, and that the wallet should not
63+
//! generate automatically generate new descriptors if it is later
64+
//! encrypted. To support this behavior, descriptor wallets unlike legacy
65+
//! wallets do not automatically unset the BLANK flag when things are
66+
//! imported.
67+
//!
6068
//! This flag is also a mandatory flag to prevent previous versions of
6169
//! bitcoin from opening the wallet, thinking it was newly created, and
6270
//! then improperly reinitializing it.

0 commit comments

Comments
 (0)