diff --git a/src/llmq/signing_shares.cpp b/src/llmq/signing_shares.cpp index baa31593d2546..5f53acce396c6 100644 --- a/src/llmq/signing_shares.cpp +++ b/src/llmq/signing_shares.cpp @@ -1479,7 +1479,7 @@ void CSigSharesManager::WorkThreadMain() void CSigSharesManager::AsyncSign(const CQuorumCPtr& quorum, const uint256& id, const uint256& msgHash) { - LOCK(cs); + LOCK(cs_pendingSigns); pendingSigns.emplace_back(quorum, id, msgHash); } @@ -1487,7 +1487,7 @@ void CSigSharesManager::SignPendingSigShares() { std::vector v; { - LOCK(cs); + LOCK(cs_pendingSigns); v = std::move(pendingSigns); } diff --git a/src/llmq/signing_shares.h b/src/llmq/signing_shares.h index e21b6e18ab101..cd772b85a0b65 100644 --- a/src/llmq/signing_shares.h +++ b/src/llmq/signing_shares.h @@ -399,7 +399,8 @@ class CSigSharesManager : public CRecoveredSigsListener PendingSignatureData(CQuorumCPtr quorum, const uint256& id, const uint256& msgHash) : quorum(std::move(quorum)), id(id), msgHash(msgHash){} }; - std::vector pendingSigns GUARDED_BY(cs); + Mutex cs_pendingSigns; + std::vector pendingSigns GUARDED_BY(cs_pendingSigns); FastRandomContext rnd GUARDED_BY(cs);