Skip to content

Commit dc1d437

Browse files
committed
fmt: clang-format
1 parent 54a7ae2 commit dc1d437

File tree

4 files changed

+14
-10
lines changed

4 files changed

+14
-10
lines changed

src/governance/governance.cpp

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,8 @@ bool CGovernanceManager::ProcessObject(const CNode& peer, const uint256& nHash,
194194

195195
bool fRateCheckBypassed = false;
196196
if (!MasternodeRateCheck(govobj, true, false, fRateCheckBypassed)) {
197-
LogPrint(BCLog::GOBJECT, "MNGOVERNANCEOBJECT -- masternode rate check failed - %s - (current block height %d) \n", strHash, nCachedBlockHeight);
197+
LogPrint(BCLog::GOBJECT, "MNGOVERNANCEOBJECT -- masternode rate check failed - %s - (current block height %d) \n",
198+
strHash, nCachedBlockHeight);
198199
return true;
199200
}
200201

@@ -207,7 +208,10 @@ bool CGovernanceManager::ProcessObject(const CNode& peer, const uint256& nHash,
207208

208209
bool unused_rcb;
209210
if (fRateCheckBypassed && fIsValid && !MasternodeRateCheck(govobj, true, true, unused_rcb)) {
210-
LogPrint(BCLog::GOBJECT, "MNGOVERNANCEOBJECT -- masternode rate check failed (after signature verification) - %s - (current block height %d)\n", strHash, nCachedBlockHeight);
211+
LogPrint(BCLog::GOBJECT, /* Continued */
212+
"MNGOVERNANCEOBJECT -- masternode rate check failed (after signature verification) - %s - (current "
213+
"block height %d)\n",
214+
strHash, nCachedBlockHeight);
211215
return true;
212216
}
213217

src/governance/governance.h

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -376,19 +376,17 @@ class CGovernanceManager : public GovernanceStore, public GovernanceSignerParent
376376
[[nodiscard]] MessageProcessingResult SyncObjects(CNode& peer, CConnman& connman) const
377377
EXCLUSIVE_LOCKS_REQUIRED(!cs_store);
378378
[[nodiscard]] MessageProcessingResult SyncSingleObjVotes(CNode& peer, const uint256& nProp, const CBloomFilter& filter,
379-
CConnman& connman)
380-
EXCLUSIVE_LOCKS_REQUIRED(!cs_store);
379+
CConnman& connman) EXCLUSIVE_LOCKS_REQUIRED(!cs_store);
381380
/// Called to indicate a requested object or vote has been received
382-
bool AcceptMessage(const uint256& nHash)
383-
EXCLUSIVE_LOCKS_REQUIRED(!cs_store);
384-
bool ProcessObject(const CNode& peer, const uint256& hash, CGovernanceObject govobj) EXCLUSIVE_LOCKS_REQUIRED(::cs_main, !cs_store);
381+
bool AcceptMessage(const uint256& nHash) EXCLUSIVE_LOCKS_REQUIRED(!cs_store);
382+
bool ProcessObject(const CNode& peer, const uint256& hash, CGovernanceObject govobj)
383+
EXCLUSIVE_LOCKS_REQUIRED(::cs_main, !cs_store);
385384

386385
CDeterministicMNManager& GetMNManager();
387386
bool ProcessVote(CNode* pfrom, const CGovernanceVote& vote, CGovernanceException& exception, CConnman& connman)
388387
EXCLUSIVE_LOCKS_REQUIRED(!cs_store);
389388

390389

391-
392390
private:
393391
// Internal counterparts to "Thread-safe accessors"
394392
void AddPostponedObjectInternal(const CGovernanceObject& govobj)

src/governance/net_governance.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -417,8 +417,9 @@ void NetGovernance::ProcessMessage(CNode& peer, CConnman& connman, const std::st
417417
std::string strHash = nHash.ToString();
418418

419419
if (!m_gov_manager.AcceptMessage(nHash)) {
420-
LogPrint(BCLog::GOBJECT, "MNGOVERNANCEOBJECTVOTE -- Received unrequested vote object: %s, hash: %s, peer = %d\n",
421-
vote.ToString(tip_mn_list), strHash, peer.GetId());
420+
LogPrint(BCLog::GOBJECT, /* Continued */
421+
"MNGOVERNANCEOBJECTVOTE -- Received unrequested vote object: %s, hash: %s, peer = %d\n",
422+
vote.ToString(tip_mn_list), strHash, peer.GetId());
422423
return;
423424
}
424425

src/governance/net_governance.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ class NetGovernance final : public NetHandler
2525
void Schedule(CScheduler& scheduler, CConnman& connman) override;
2626

2727
void ProcessMessage(CNode& peer, CConnman& connman, const std::string& msg_type, CDataStream& vRecv) override;
28+
2829
private:
2930
void SendGovernanceSyncRequest(CNode* pnode, CConnman& connman) const;
3031
int RequestGovernanceObjectVotes(const std::vector<CNode*>& vNodesCopy, CConnman& connman) const;

0 commit comments

Comments
 (0)