Skip to content

Commit

Permalink
wallet: removing unnecessary mempool.cs lock from ReacceptWalletTra…
Browse files Browse the repository at this point in the history
…nsactions()
  • Loading branch information
furszy committed Mar 11, 2021
1 parent 63f3fa7 commit 5658844
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/wallet/wallet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1930,11 +1930,9 @@ void CWallet::ReacceptWalletTransactions(bool fFirstLoad)
}

// Try to add wallet transactions to memory pool
for (std::pair<const int64_t, CWalletTx*>& item: mapSorted)
{
for (std::pair<const int64_t, CWalletTx*>& item: mapSorted) {
CWalletTx& wtx = *(item.second);

LOCK(mempool.cs);
CValidationState state;
bool fSuccess = wtx.AcceptToMemoryPool(state, false);
if (!fSuccess && fFirstLoad && GetTime() - wtx.GetTxTime() > 12*60*60) {
Expand Down

0 comments on commit 5658844

Please sign in to comment.