Split SetActiveScriptPubKeyMan into Add/LoadActiveScriptPubKeyMan

Remove the memonly bool and follow the Add and Load pattern we use
everywhere else.
This commit is contained in:
Andrew Chow
2020-05-21 23:01:24 -04:00
parent 0122fbab4c
commit d9cd095b59
4 changed files with 22 additions and 14 deletions

View File

@@ -748,10 +748,10 @@ DBErrors WalletBatch::LoadWallet(CWallet* pwallet)
// Set the active ScriptPubKeyMans
for (auto spk_man_pair : wss.m_active_external_spks) {
pwallet->SetActiveScriptPubKeyMan(spk_man_pair.second, spk_man_pair.first, /* internal */ false, /* memonly */ true);
pwallet->LoadActiveScriptPubKeyMan(spk_man_pair.second, spk_man_pair.first, /* internal */ false);
}
for (auto spk_man_pair : wss.m_active_internal_spks) {
pwallet->SetActiveScriptPubKeyMan(spk_man_pair.second, spk_man_pair.first, /* internal */ true, /* memonly */ true);
pwallet->LoadActiveScriptPubKeyMan(spk_man_pair.second, spk_man_pair.first, /* internal */ true);
}
// Set the descriptor caches