Skip to content

Commit

Permalink
Wallet: remove cs_main requirement from RelayWalletTransaction and Fu…
Browse files Browse the repository at this point in the history
…ndTransaction.
  • Loading branch information
furszy committed Mar 10, 2021
1 parent 1e7ffc2 commit a7f6ab1
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/wallet/wallet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1950,7 +1950,6 @@ void CWalletTx::RelayWalletTransaction(CConnman* connman)
// Nothing to do. Return early
return;
}
LOCK(cs_main);
if (GetDepthInMainChain() == 0 && !isAbandoned()) {
const uint256& hash = GetHash();
LogPrintf("Relaying wtx %s\n", hash.ToString());
Expand Down Expand Up @@ -2801,7 +2800,7 @@ bool CWallet::FundTransaction(CMutableTransaction& tx, CAmount& nFeeRet, bool ov
tx.vin.push_back(txin);

if (lockUnspents) {
LOCK2(cs_main, cs_wallet);
LOCK(cs_wallet);
LockCoin(txin.prevout);
}
}
Expand Down

0 comments on commit a7f6ab1

Please sign in to comment.