From 7a4f608c2f7cc8e7bee88bc5ce6864d53d37bf0d Mon Sep 17 00:00:00 2001 From: pasta Date: Tue, 23 Jul 2024 23:34:33 -0500 Subject: [PATCH] style: apply clang-format suggestions --- src/coinjoin/client.h | 14 +++++++++++--- src/coinjoin/coinjoin.cpp | 2 +- src/coinjoin/context.cpp | 16 +++++++++++----- src/coinjoin/context.h | 6 +++--- src/coinjoin/server.h | 7 ++++--- 5 files changed, 30 insertions(+), 15 deletions(-) diff --git a/src/coinjoin/client.h b/src/coinjoin/client.h index ef6310c1deb980..ff9640a695bc61 100644 --- a/src/coinjoin/client.h +++ b/src/coinjoin/client.h @@ -210,9 +210,17 @@ class CCoinJoinClientQueueManager : public CCoinJoinBaseManager const bool m_is_masternode; public: - explicit CCoinJoinClientQueueManager(CConnman& _connman, std::unique_ptr& _peerman, CoinJoinWalletManager& walletman, CDeterministicMNManager& dmnman, - CMasternodeMetaMan& mn_metaman, const CMasternodeSync& mn_sync, bool is_masternode) : - connman(_connman), peerman(_peerman), m_walletman(walletman), m_dmnman(dmnman), m_mn_metaman(mn_metaman), m_mn_sync(mn_sync), m_is_masternode{is_masternode} {}; + explicit CCoinJoinClientQueueManager(CConnman& _connman, std::unique_ptr& _peerman, + CoinJoinWalletManager& walletman, CDeterministicMNManager& dmnman, + CMasternodeMetaMan& mn_metaman, const CMasternodeSync& mn_sync, + bool is_masternode) : + connman(_connman), + peerman(_peerman), + m_walletman(walletman), + m_dmnman(dmnman), + m_mn_metaman(mn_metaman), + m_mn_sync(mn_sync), + m_is_masternode{is_masternode} {}; PeerMsgRet ProcessMessage(const CNode& peer, std::string_view msg_type, CDataStream& vRecv) EXCLUSIVE_LOCKS_REQUIRED(!cs_vecqueue); PeerMsgRet ProcessDSQueue(const CNode& peer, CDataStream& vRecv); diff --git a/src/coinjoin/coinjoin.cpp b/src/coinjoin/coinjoin.cpp index 2a014e4ebf5c1b..7abe8b4ad0a2f6 100644 --- a/src/coinjoin/coinjoin.cpp +++ b/src/coinjoin/coinjoin.cpp @@ -14,13 +14,13 @@ #include #include #include +#include #include #include #include #include #include #include -#include #include #include diff --git a/src/coinjoin/context.cpp b/src/coinjoin/context.cpp index 48eba3b393d9d6..6e3beb79806038 100644 --- a/src/coinjoin/context.cpp +++ b/src/coinjoin/context.cpp @@ -9,15 +9,21 @@ #endif // ENABLE_WALLET #include -CJContext::CJContext(CChainState& chainstate, CConnman& connman, CDeterministicMNManager& dmnman, CMasternodeMetaMan& mn_metaman, - CTxMemPool& mempool, const CActiveMasternodeManager* const mn_activeman, const CMasternodeSync& mn_sync, +CJContext::CJContext(CChainState& chainstate, CConnman& connman, CDeterministicMNManager& dmnman, + CMasternodeMetaMan& mn_metaman, CTxMemPool& mempool, + const CActiveMasternodeManager* const mn_activeman, const CMasternodeSync& mn_sync, std::unique_ptr& peerman, bool relay_txes) : dstxman{std::make_unique()}, #ifdef ENABLE_WALLET - walletman{std::make_unique(chainstate, connman, dmnman, mn_metaman, mempool, mn_sync, queueman, /* is_masternode = */ mn_activeman != nullptr)}, - queueman {relay_txes ? std::make_unique(connman, peerman, *walletman, dmnman, mn_metaman, mn_sync, /* is_masternode = */ mn_activeman != nullptr) : nullptr}, + walletman{std::make_unique(chainstate, connman, dmnman, mn_metaman, mempool, mn_sync, + queueman, /* is_masternode = */ mn_activeman != nullptr)}, + queueman{relay_txes + ? std::make_unique(connman, peerman, *walletman, dmnman, mn_metaman, + mn_sync, /* is_masternode = */ mn_activeman != nullptr) + : nullptr}, #endif // ENABLE_WALLET - server{std::make_unique(chainstate, connman, dmnman, *dstxman, mn_metaman, mempool, mn_activeman, mn_sync, peerman)} + server{std::make_unique(chainstate, connman, dmnman, *dstxman, mn_metaman, mempool, mn_activeman, + mn_sync, peerman)} {} CJContext::~CJContext() {} diff --git a/src/coinjoin/context.h b/src/coinjoin/context.h index d24a33f13e1a0c..08cb67801b0a83 100644 --- a/src/coinjoin/context.h +++ b/src/coinjoin/context.h @@ -31,9 +31,9 @@ class CoinJoinWalletManager; struct CJContext { CJContext() = delete; CJContext(const CJContext&) = delete; - CJContext(CChainState& chainstate, CConnman& connman, CDeterministicMNManager& dmnman, CMasternodeMetaMan& mn_metaman, - CTxMemPool& mempool, const CActiveMasternodeManager* const mn_activeman, const CMasternodeSync& mn_sync, - std::unique_ptr& peerman, bool relay_txes); + CJContext(CChainState& chainstate, CConnman& connman, CDeterministicMNManager& dmnman, + CMasternodeMetaMan& mn_metaman, CTxMemPool& mempool, const CActiveMasternodeManager* const mn_activeman, + const CMasternodeSync& mn_sync, std::unique_ptr& peerman, bool relay_txes); ~CJContext(); const std::unique_ptr dstxman; diff --git a/src/coinjoin/server.h b/src/coinjoin/server.h index 4554630a1f8bf1..f5539cd783eb64 100644 --- a/src/coinjoin/server.h +++ b/src/coinjoin/server.h @@ -90,9 +90,10 @@ class CCoinJoinServer : public CCoinJoinBaseSession, public CCoinJoinBaseManager void SetNull() override EXCLUSIVE_LOCKS_REQUIRED(cs_coinjoin); public: - explicit CCoinJoinServer(CChainState& chainstate, CConnman& _connman, CDeterministicMNManager& dmnman, CDSTXManager& dstxman, - CMasternodeMetaMan& mn_metaman, CTxMemPool& mempool, const CActiveMasternodeManager* const mn_activeman, - const CMasternodeSync& mn_sync, std::unique_ptr& peerman) : + explicit CCoinJoinServer(CChainState& chainstate, CConnman& _connman, CDeterministicMNManager& dmnman, + CDSTXManager& dstxman, CMasternodeMetaMan& mn_metaman, CTxMemPool& mempool, + const CActiveMasternodeManager* const mn_activeman, const CMasternodeSync& mn_sync, + std::unique_ptr& peerman) : m_chainstate(chainstate), connman(_connman), m_dmnman(dmnman),