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
committed by Sami Ahmed
parent c464e6c59d
commit 514867c5d9
+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;
}