wallet: remove unimplemented RewriteDB calls from SPKM

ISTM that there is no implementation left of the `RewriteDB` method
in any of the SPKMs, and thus, its call sites can be removed safely.
This commit is contained in:
rkrux 2026-01-15 15:36:21 +05:30
parent eb97250421
commit 61039d72a5
No known key found for this signature in database
GPG Key ID: 8614B8BD2E144C6D
2 changed files with 2 additions and 11 deletions

View File

@ -120,9 +120,6 @@ public:
virtual bool HavePrivateKeys() const { return false; }
virtual bool HaveCryptedKeys() const { return false; }
//! The action to do when the DB needs rewrite
virtual void RewriteDB() {}
virtual unsigned int GetKeyPoolSize() const { return 0; }
virtual int64_t GetTimeFirstKey() const { return 0; }

View File

@ -2357,14 +2357,8 @@ DBErrors CWallet::PopulateWalletFromDB(bilingual_str& error, std::vector<bilingu
Assert(m_spk_managers.empty());
Assert(m_wallet_flags == 0);
DBErrors nLoadWalletRet = WalletBatch(GetDatabase()).LoadWallet(this);
if (nLoadWalletRet == DBErrors::NEED_REWRITE)
{
if (GetDatabase().Rewrite())
{
for (const auto& spk_man_pair : m_spk_managers) {
spk_man_pair.second->RewriteDB();
}
}
if (nLoadWalletRet == DBErrors::NEED_REWRITE) {
GetDatabase().Rewrite();
}
if (m_spk_managers.empty()) {