mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-04-12 08:37:58 +02:00
wallet: remove DBErrors::NEED_REWRITE enum value
As highlighted in the PR review comment, this enum seems no longer required as the specific issue it solves for involves BDB based wallets that can't be loaded anymore outside the context of wallet migration, which rewrites the database anyway.
This commit is contained in:
@@ -2357,9 +2357,6 @@ 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) {
|
||||
GetDatabase().Rewrite();
|
||||
}
|
||||
|
||||
if (m_spk_managers.empty()) {
|
||||
assert(m_external_spk_managers.empty());
|
||||
@@ -2388,9 +2385,6 @@ DBErrors CWallet::PopulateWalletFromDB(bilingual_str& error, std::vector<bilingu
|
||||
case DBErrors::EXTERNAL_SIGNER_SUPPORT_REQUIRED:
|
||||
error = strprintf(_("Error loading %s: External signer wallet being loaded without external signer support compiled"), wallet_file);
|
||||
break;
|
||||
case DBErrors::NEED_REWRITE:
|
||||
error = strprintf(_("Wallet needed to be rewritten: restart %s to complete"), CLIENT_NAME);
|
||||
break;
|
||||
case DBErrors::UNKNOWN_DESCRIPTOR:
|
||||
error = strprintf(_("Unrecognized descriptor found. Loading wallet %s\n\n"
|
||||
"The wallet might have been created on a newer version.\n"
|
||||
|
||||
Reference in New Issue
Block a user