SetHDChaiin
, SetActiveScriptPubKeyMan
, and SetWalletFlags
have a memonly
argument which is kind of confusing, as noted in #17681 (review). This PR replaces those functions with Add*
and Load*
variants so that they follow the pattern used elsewhere in the wallet.
AddHDChain
, AddActiveScriptPubKeyMan
, and AddWalletFlags
both set their respective variables in CWallet
and writes them to disk. These functions are used by the actions which modify the wallet such as sethdseed
, importdescriptors
, and creating a new wallet.
LoadHDChain
, LoadActiveScriptPubKeyMan
, and LoadWalletFlags
just set the CWallet
variables. These functions are used by LoadWallet
when loading the wallet from disk.