Make legacy wallet upgrades from non-HD to HD always flush the keypool

This commit is contained in:
Samuel Dobson
2021-09-26 12:00:35 +13:00
parent 2434b10781
commit 6f6f7bb36c
2 changed files with 3 additions and 15 deletions

View File

@@ -489,7 +489,7 @@ bool LegacyScriptPubKeyMan::Upgrade(int prev_version, int new_version, bilingual
}
// Regenerate the keypool if upgraded to HD
if (hd_upgrade) {
if (!TopUp()) {
if (!NewKeyPool()) {
error = _("Unable to generate keys");
return false;
}