wallet(HD): flush keypool on seed set so getnewaddress yields HD keys immediately

This commit is contained in:
Sami
2026-06-15 16:07:23 -07:00
parent c1c9f19870
commit 6cf30350ea
+3
View File
@@ -2935,6 +2935,9 @@ bool CWallet::SetHDSeed(const std::string& mnemonicIn, const std::string& passph
}
wdb.WriteHDChain(nHDChainIndex);
}
// Replace any pre-existing (random) keypool with HD-derived keys so that
// getnewaddress immediately hands out deterministic m/44'/2222'/0'/0/i keys.
NewKeyPool();
mnemonicOut = m;
return true;
}