From 7c8111f30471aa028820a5da441df34844a20ac8 Mon Sep 17 00:00:00 2001 From: Jack Grigg Date: Thu, 19 Sep 2019 20:59:05 +0100 Subject: [PATCH] Remove cs_main lock requirement from CWallet::SyncTransaction SetMerkleBranch was the only call underneath SyncTransaction that required the cs_main lock. --- src/wallet/wallet.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp index dbf292b7e..e83a1734e 100644 --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -1703,7 +1703,7 @@ bool CWallet::AddToWalletIfInvolvingMe(const CTransaction& tx, const CBlock* pbl void CWallet::SyncTransaction(const CTransaction& tx, const CBlock* pblock) { - LOCK2(cs_main, cs_wallet); + LOCK(cs_wallet); if (!AddToWalletIfInvolvingMe(tx, pblock, true)) return; // Not one of ours