From c6a6435cedac01a6800cac9285e2c599290e2e0d Mon Sep 17 00:00:00 2001 From: rkrux Date: Fri, 16 Jan 2026 16:25:51 +0530 Subject: [PATCH] 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. --- src/wallet/wallet.cpp | 6 ------ src/wallet/walletdb.cpp | 6 ------ src/wallet/walletdb.h | 1 - 3 files changed, 13 deletions(-) diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp index e1e0d307ccc..fe074a3a804 100644 --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -2357,9 +2357,6 @@ DBErrors CWallet::PopulateWalletFromDB(bilingual_str& error, std::vector 0) { - // Rewrite encrypted wallets of versions 0.4.0 and 0.5.0rc: - if (last_client == 40000 || last_client == 50000) result = std::max(result, DBErrors::NEED_REWRITE); - } - // Load keymeta std::map hd_chains; LoadResult keymeta_res = LoadRecords(pwallet, batch, DBKeys::KEYMETA, diff --git a/src/wallet/walletdb.h b/src/wallet/walletdb.h index 65ff8c0b60f..455fc745571 100644 --- a/src/wallet/walletdb.h +++ b/src/wallet/walletdb.h @@ -44,7 +44,6 @@ enum class DBErrors : int { LOAD_OK = 0, NEED_RESCAN = 1, - NEED_REWRITE = 2, EXTERNAL_SIGNER_SUPPORT_REQUIRED = 3, NONCRITICAL_ERROR = 4, TOO_NEW = 5,