From d6b49a0fbc260b94583b0ca89a0178e261a9278d Mon Sep 17 00:00:00 2001 From: pasta Date: Thu, 5 Sep 2024 12:18:37 -0500 Subject: [PATCH] fmt: apply clang format --- src/coinjoin/coinjoin.cpp | 5 +---- src/coinjoin/coinjoin.h | 14 +++++++------- 2 files changed, 8 insertions(+), 11 deletions(-) diff --git a/src/coinjoin/coinjoin.cpp b/src/coinjoin/coinjoin.cpp index 14dea4820521a..c081df92861ac 100644 --- a/src/coinjoin/coinjoin.cpp +++ b/src/coinjoin/coinjoin.cpp @@ -47,10 +47,7 @@ uint256 CCoinJoinQueue::GetSignatureHash() const { return SerializeHash(*this, SER_GETHASH, PROTOCOL_VERSION); } -uint256 CCoinJoinQueue::GetHash() const -{ - return SerializeHash(*this, SER_NETWORK, PROTOCOL_VERSION); -} +uint256 CCoinJoinQueue::GetHash() const { return SerializeHash(*this, SER_NETWORK, PROTOCOL_VERSION); } bool CCoinJoinQueue::Sign(const CActiveMasternodeManager& mn_activeman) { diff --git a/src/coinjoin/coinjoin.h b/src/coinjoin/coinjoin.h index 3cd12c3915e22..8bbab7a4e534e 100644 --- a/src/coinjoin/coinjoin.h +++ b/src/coinjoin/coinjoin.h @@ -343,17 +343,17 @@ class CCoinJoinBaseManager int GetQueueSize() const EXCLUSIVE_LOCKS_REQUIRED(!cs_vecqueue) { LOCK(cs_vecqueue); return vecCoinJoinQueue.size(); } bool GetQueueItemAndTry(CCoinJoinQueue& dsqRet) EXCLUSIVE_LOCKS_REQUIRED(!cs_vecqueue); - bool HasQueue(const uint256& queueHash) EXCLUSIVE_LOCKS_REQUIRED(!cs_vecqueue) { + bool HasQueue(const uint256& queueHash) EXCLUSIVE_LOCKS_REQUIRED(!cs_vecqueue) + { LOCK(cs_vecqueue); - return std::any_of(vecCoinJoinQueue.begin(), vecCoinJoinQueue.end(), [&queueHash](auto q) { - return q.GetHash() == queueHash; - }); + return std::any_of(vecCoinJoinQueue.begin(), vecCoinJoinQueue.end(), + [&queueHash](auto q) { return q.GetHash() == queueHash; }); } - std::optional GetQueueFromHash(const uint256& queueHash) EXCLUSIVE_LOCKS_REQUIRED(!cs_vecqueue) { + std::optional GetQueueFromHash(const uint256& queueHash) EXCLUSIVE_LOCKS_REQUIRED(!cs_vecqueue) + { LOCK(cs_vecqueue); - return ranges::find_if_opt(vecCoinJoinQueue, [&queueHash](const auto& q){ return q.GetHash() == queueHash; }); + return ranges::find_if_opt(vecCoinJoinQueue, [&queueHash](const auto& q) { return q.GetHash() == queueHash; }); } - }; // Various helpers and dstx manager implementation