mirror of
https://github.com/dashpay/dash.git
synced 2024-12-25 03:52:49 +01:00
fmt: apply formatting suggestions from clang-format-diff.py
This commit is contained in:
parent
63962ec475
commit
76a458e5f9
@ -1221,7 +1221,8 @@ int CGovernanceManager::RequestGovernanceObjectVotes(CNode& peer, CConnman& conn
|
||||
return RequestGovernanceObjectVotes(vNodeCopy, connman, peerman);
|
||||
}
|
||||
|
||||
int CGovernanceManager::RequestGovernanceObjectVotes(const std::vector<CNode*>& vNodesCopy, CConnman& connman, const PeerManager& peerman) const
|
||||
int CGovernanceManager::RequestGovernanceObjectVotes(const std::vector<CNode*>& vNodesCopy, CConnman& connman,
|
||||
const PeerManager& peerman) const
|
||||
{
|
||||
static std::map<uint256, std::map<CService, int64_t> > mapAskedRecently;
|
||||
|
||||
|
@ -358,7 +358,8 @@ public:
|
||||
void InitOnLoad();
|
||||
|
||||
int RequestGovernanceObjectVotes(CNode& peer, CConnman& connman, const PeerManager& peerman) const;
|
||||
int RequestGovernanceObjectVotes(const std::vector<CNode*>& vNodesCopy, CConnman& connman, const PeerManager& peerman) const;
|
||||
int RequestGovernanceObjectVotes(const std::vector<CNode*>& vNodesCopy, CConnman& connman,
|
||||
const PeerManager& peerman) const;
|
||||
|
||||
/*
|
||||
* Trigger Management (formerly CGovernanceTriggerManager)
|
||||
|
@ -60,7 +60,8 @@ PeerMsgRet CQuorumBlockProcessor::ProcessMessage(const CNode& peer, std::string_
|
||||
CFinalCommitment qc;
|
||||
vRecv >> qc;
|
||||
|
||||
WITH_LOCK(::cs_main, Assert(m_peerman)->EraseObjectRequest(peer.GetId(), CInv(MSG_QUORUM_FINAL_COMMITMENT, ::SerializeHash(qc))));
|
||||
WITH_LOCK(::cs_main, Assert(m_peerman)->EraseObjectRequest(peer.GetId(),
|
||||
CInv(MSG_QUORUM_FINAL_COMMITMENT, ::SerializeHash(qc))));
|
||||
|
||||
if (qc.IsNull()) {
|
||||
LogPrint(BCLog::LLMQ, "CQuorumBlockProcessor::%s -- null commitment from peer=%d\n", __func__, peer.GetId());
|
||||
|
@ -1446,7 +1446,8 @@ void CInstantSendManager::RemoveConflictingLock(const uint256& islockHash, const
|
||||
}
|
||||
}
|
||||
|
||||
void CInstantSendManager::AskNodesForLockedTx(const uint256& txid, const CConnman& connman, PeerManager& peerman, bool is_masternode)
|
||||
void CInstantSendManager::AskNodesForLockedTx(const uint256& txid, const CConnman& connman, PeerManager& peerman,
|
||||
bool is_masternode)
|
||||
{
|
||||
std::vector<CNode*> nodesToAskFor;
|
||||
nodesToAskFor.reserve(4);
|
||||
@ -1476,7 +1477,8 @@ void CInstantSendManager::AskNodesForLockedTx(const uint256& txid, const CConnma
|
||||
txid.ToString(), pnode->GetId());
|
||||
|
||||
CInv inv(MSG_TX, txid);
|
||||
peerman.RequestObject(pnode->GetId(), inv, GetTime<std::chrono::microseconds>(), is_masternode, /* fForce = */ true);
|
||||
peerman.RequestObject(pnode->GetId(), inv, GetTime<std::chrono::microseconds>(), is_masternode,
|
||||
/* fForce = */ true);
|
||||
}
|
||||
}
|
||||
for (CNode* pnode : nodesToAskFor) {
|
||||
|
@ -315,8 +315,7 @@ private:
|
||||
EXCLUSIVE_LOCKS_REQUIRED(!cs_inputReqests, !cs_nonLocked, !cs_pendingRetry);
|
||||
void ResolveBlockConflicts(const uint256& islockHash, const CInstantSendLock& islock)
|
||||
EXCLUSIVE_LOCKS_REQUIRED(!cs_inputReqests, !cs_nonLocked, !cs_pendingLocks, !cs_pendingRetry);
|
||||
static void AskNodesForLockedTx(const uint256& txid, const CConnman& connman, PeerManager& peerman,
|
||||
bool is_masternode);
|
||||
static void AskNodesForLockedTx(const uint256& txid, const CConnman& connman, PeerManager& peerman, bool is_masternode);
|
||||
void ProcessPendingRetryLockTxs()
|
||||
EXCLUSIVE_LOCKS_REQUIRED(!cs_creating, !cs_inputReqests, !cs_nonLocked, !cs_pendingRetry);
|
||||
|
||||
|
@ -604,7 +604,8 @@ static bool PreVerifyRecoveredSig(const CQuorumManager& quorum_manager, const CR
|
||||
|
||||
PeerMsgRet CSigningManager::ProcessMessageRecoveredSig(const CNode& pfrom, const std::shared_ptr<const CRecoveredSig>& recoveredSig)
|
||||
{
|
||||
WITH_LOCK(::cs_main, Assert(m_peerman)->EraseObjectRequest(pfrom.GetId(), CInv(MSG_QUORUM_RECOVERED_SIG, recoveredSig->GetHash())));
|
||||
WITH_LOCK(::cs_main, Assert(m_peerman)->EraseObjectRequest(pfrom.GetId(),
|
||||
CInv(MSG_QUORUM_RECOVERED_SIG, recoveredSig->GetHash())));
|
||||
|
||||
bool ban = false;
|
||||
if (!PreVerifyRecoveredSig(qman, *recoveredSig, ban)) {
|
||||
|
@ -146,7 +146,8 @@ PeerMsgRet CSporkManager::ProcessSpork(const CNode& peer, PeerManager& peerman,
|
||||
uint256 hash = spork.GetHash();
|
||||
|
||||
WITH_LOCK(::cs_main, peerman.EraseObjectRequest(peer.GetId(), CInv(MSG_SPORK, hash)));
|
||||
std::string strLogMsg{strprintf("SPORK -- hash: %s id: %d value: %10d peer=%d", hash.ToString(), spork.nSporkID, spork.nValue, peer.GetId())};
|
||||
std::string strLogMsg{strprintf("SPORK -- hash: %s id: %d value: %10d peer=%d", hash.ToString(), spork.nSporkID,
|
||||
spork.nValue, peer.GetId())};
|
||||
|
||||
if (spork.nTimeSigned > GetAdjustedTime() + 2 * 60 * 60) {
|
||||
LogPrint(BCLog::SPORK, "CSporkManager::ProcessSpork -- ERROR: too far into the future\n");
|
||||
|
Loading…
Reference in New Issue
Block a user