Skip to content

Commit 9eb2c82

Browse files
committed
walletdb: Remove unused upgraded_txs
1 parent c668033 commit 9eb2c82

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

src/wallet/walletdb.cpp

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1005,7 +1005,7 @@ static DBErrors LoadAddressBookRecords(CWallet* pwallet, DatabaseBatch& batch) E
10051005
return result;
10061006
}
10071007

1008-
static DBErrors LoadTxRecords(CWallet* pwallet, DatabaseBatch& batch, std::vector<Txid>& upgraded_txs, bool& any_unordered) EXCLUSIVE_LOCKS_REQUIRED(pwallet->cs_wallet)
1008+
static DBErrors LoadTxRecords(CWallet* pwallet, DatabaseBatch& batch, bool& any_unordered) EXCLUSIVE_LOCKS_REQUIRED(pwallet->cs_wallet)
10091009
{
10101010
AssertLockHeld(pwallet->cs_wallet);
10111011
DBErrors result = DBErrors::LOAD_OK;
@@ -1128,7 +1128,6 @@ DBErrors WalletBatch::LoadWallet(CWallet* pwallet)
11281128
{
11291129
DBErrors result = DBErrors::LOAD_OK;
11301130
bool any_unordered = false;
1131-
std::vector<Txid> upgraded_txs;
11321131

11331132
LOCK(pwallet->cs_wallet);
11341133

@@ -1165,7 +1164,7 @@ DBErrors WalletBatch::LoadWallet(CWallet* pwallet)
11651164
result = std::max(LoadAddressBookRecords(pwallet, *m_batch), result);
11661165

11671166
// Load tx records
1168-
result = std::max(LoadTxRecords(pwallet, *m_batch, upgraded_txs, any_unordered), result);
1167+
result = std::max(LoadTxRecords(pwallet, *m_batch, any_unordered), result);
11691168

11701169
// Load SPKMs
11711170
result = std::max(LoadActiveSPKMs(pwallet, *m_batch), result);
@@ -1189,9 +1188,6 @@ DBErrors WalletBatch::LoadWallet(CWallet* pwallet)
11891188
if (result != DBErrors::LOAD_OK)
11901189
return result;
11911190

1192-
for (const Txid& hash : upgraded_txs)
1193-
WriteTx(pwallet->mapWallet.at(hash));
1194-
11951191
if (!has_last_client || last_client != CLIENT_VERSION) // Update
11961192
m_batch->Write(DBKeys::VERSION, CLIENT_VERSION);
11971193

0 commit comments

Comments
 (0)