From 9eb2c82e7c911a066781d67e6846cf6bbbaba6e9 Mon Sep 17 00:00:00 2001 From: Ava Chow Date: Tue, 17 Jun 2025 14:16:33 -0700 Subject: [PATCH] walletdb: Remove unused upgraded_txs --- src/wallet/walletdb.cpp | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/wallet/walletdb.cpp b/src/wallet/walletdb.cpp index ef26f685f22..6f552076633 100644 --- a/src/wallet/walletdb.cpp +++ b/src/wallet/walletdb.cpp @@ -1005,7 +1005,7 @@ static DBErrors LoadAddressBookRecords(CWallet* pwallet, DatabaseBatch& batch) E return result; } -static DBErrors LoadTxRecords(CWallet* pwallet, DatabaseBatch& batch, std::vector& upgraded_txs, bool& any_unordered) EXCLUSIVE_LOCKS_REQUIRED(pwallet->cs_wallet) +static DBErrors LoadTxRecords(CWallet* pwallet, DatabaseBatch& batch, bool& any_unordered) EXCLUSIVE_LOCKS_REQUIRED(pwallet->cs_wallet) { AssertLockHeld(pwallet->cs_wallet); DBErrors result = DBErrors::LOAD_OK; @@ -1128,7 +1128,6 @@ DBErrors WalletBatch::LoadWallet(CWallet* pwallet) { DBErrors result = DBErrors::LOAD_OK; bool any_unordered = false; - std::vector upgraded_txs; LOCK(pwallet->cs_wallet); @@ -1165,7 +1164,7 @@ DBErrors WalletBatch::LoadWallet(CWallet* pwallet) result = std::max(LoadAddressBookRecords(pwallet, *m_batch), result); // Load tx records - result = std::max(LoadTxRecords(pwallet, *m_batch, upgraded_txs, any_unordered), result); + result = std::max(LoadTxRecords(pwallet, *m_batch, any_unordered), result); // Load SPKMs result = std::max(LoadActiveSPKMs(pwallet, *m_batch), result); @@ -1189,9 +1188,6 @@ DBErrors WalletBatch::LoadWallet(CWallet* pwallet) if (result != DBErrors::LOAD_OK) return result; - for (const Txid& hash : upgraded_txs) - WriteTx(pwallet->mapWallet.at(hash)); - if (!has_last_client || last_client != CLIENT_VERSION) // Update m_batch->Write(DBKeys::VERSION, CLIENT_VERSION);