MCPcopy Create free account
hub / github.com/bitcoin/bitcoin / UpgradeDescriptorCache

Method UpgradeDescriptorCache

src/wallet/wallet.cpp:550–561  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

548}
549
550void CWallet::UpgradeDescriptorCache()
551{
552 if (!IsWalletFlagSet(WALLET_FLAG_DESCRIPTORS) || IsLocked() || IsWalletFlagSet(WALLET_FLAG_LAST_HARDENED_XPUB_CACHED)) {
553 return;
554 }
555
556 for (ScriptPubKeyMan* spkm : GetAllScriptPubKeyMans()) {
557 DescriptorScriptPubKeyMan* desc_spkm = dynamic_cast<DescriptorScriptPubKeyMan*>(spkm);
558 desc_spkm->UpgradeDescriptorCache();
559 }
560 SetWalletFlag(WALLET_FLAG_LAST_HARDENED_XPUB_CACHED);
561}
562
563/* Given a wallet passphrase string and an unencrypted master key, determine the proper key
564 * derivation parameters (should take at least 100ms) and encrypt the master key. */

Callers 1

LoadWalletMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected