mirror of
https://github.com/dashpay/dash.git
synced 2024-12-25 20:12:57 +01:00
fix curly braces
This commit is contained in:
parent
15821fe2d4
commit
aa8fdd76aa
@ -452,8 +452,7 @@ void CGovernanceManager::Sync(CNode* pfrom, uint256 nProp)
|
||||
// SYNC GOVERNANCE OBJECTS WITH OTHER CLIENT
|
||||
|
||||
std::map<uint256, CGovernanceObject>::iterator it1 = mapObjects.begin();
|
||||
while(it1 != mapObjects.end())
|
||||
{
|
||||
while(it1 != mapObjects.end()) {
|
||||
uint256 h = (*it1).first;
|
||||
|
||||
if((*it1).second.fCachedValid && ((nProp == uint256() || (h == nProp)))){
|
||||
@ -467,8 +466,7 @@ void CGovernanceManager::Sync(CNode* pfrom, uint256 nProp)
|
||||
// SYNC OUR GOVERNANCE OBJECT VOTES WITH THEIR GOVERNANCE OBJECT VOTES
|
||||
|
||||
std::map<uint256, CGovernanceVote>::iterator it2 = mapVotesByHash.begin();
|
||||
while(it2 != mapVotesByHash.end())
|
||||
{
|
||||
while(it2 != mapVotesByHash.end()) {
|
||||
pfrom->PushInventory(CInv(MSG_GOVERNANCE_VOTE, (*it2).first));
|
||||
nInvCount++;
|
||||
++it2;
|
||||
@ -518,8 +516,7 @@ bool CGovernanceManager::AddOrUpdateVote(const CGovernanceVote& vote, std::strin
|
||||
uint256 nTypeHash = vote.GetTypeHash();
|
||||
uint256 nHash = vote.GetHash();
|
||||
|
||||
if(mapVotesByType.count(nTypeHash))
|
||||
{
|
||||
if(mapVotesByType.count(nTypeHash)) {
|
||||
if(mapVotesByType[nTypeHash].nTime > vote.nTime){
|
||||
strError = strprintf("new vote older than existing vote - %s", nTypeHash.ToString());
|
||||
LogPrint("mngovernance", "CGovernanceObject::AddOrUpdateVote - %s\n", strError);
|
||||
|
59
src/main.cpp
59
src/main.cpp
@ -4425,8 +4425,7 @@ void static ProcessGetData(CNode* pfrom, const Consensus::Params& consensusParam
|
||||
}
|
||||
// Pruned nodes may have deleted the block, so check whether
|
||||
// it's available before trying to send.
|
||||
if (send && (mi->second->nStatus & BLOCK_HAVE_DATA))
|
||||
{
|
||||
if (send && (mi->second->nStatus & BLOCK_HAVE_DATA)) {
|
||||
// Send block from disk
|
||||
CBlock block;
|
||||
if (!ReadBlockFromDisk(block, (*mi).second, consensusParams))
|
||||
@ -4480,11 +4479,9 @@ void static ProcessGetData(CNode* pfrom, const Consensus::Params& consensusParam
|
||||
}
|
||||
}
|
||||
|
||||
if (!pushed && inv.type == MSG_TX)
|
||||
{
|
||||
if (!pushed && inv.type == MSG_TX) {
|
||||
CTransaction tx;
|
||||
if (mempool.lookup(inv.hash, tx))
|
||||
{
|
||||
if (mempool.lookup(inv.hash, tx)) {
|
||||
CDataStream ss(SER_NETWORK, PROTOCOL_VERSION);
|
||||
ss.reserve(1000);
|
||||
ss << tx;
|
||||
@ -4493,10 +4490,8 @@ void static ProcessGetData(CNode* pfrom, const Consensus::Params& consensusParam
|
||||
}
|
||||
}
|
||||
|
||||
if (!pushed && inv.type == MSG_TXLOCK_VOTE)
|
||||
{
|
||||
if(mapTxLockVote.count(inv.hash))
|
||||
{
|
||||
if (!pushed && inv.type == MSG_TXLOCK_VOTE) {
|
||||
if(mapTxLockVote.count(inv.hash)) {
|
||||
CDataStream ss(SER_NETWORK, PROTOCOL_VERSION);
|
||||
ss.reserve(1000);
|
||||
ss << mapTxLockVote[inv.hash];
|
||||
@ -4505,10 +4500,8 @@ void static ProcessGetData(CNode* pfrom, const Consensus::Params& consensusParam
|
||||
}
|
||||
}
|
||||
|
||||
if (!pushed && inv.type == MSG_TXLOCK_REQUEST)
|
||||
{
|
||||
if(mapTxLockReq.count(inv.hash))
|
||||
{
|
||||
if (!pushed && inv.type == MSG_TXLOCK_REQUEST) {
|
||||
if(mapTxLockReq.count(inv.hash)) {
|
||||
CDataStream ss(SER_NETWORK, PROTOCOL_VERSION);
|
||||
ss.reserve(1000);
|
||||
ss << mapTxLockReq[inv.hash];
|
||||
@ -4517,10 +4510,8 @@ void static ProcessGetData(CNode* pfrom, const Consensus::Params& consensusParam
|
||||
}
|
||||
}
|
||||
|
||||
if (!pushed && inv.type == MSG_SPORK)
|
||||
{
|
||||
if(mapSporks.count(inv.hash))
|
||||
{
|
||||
if (!pushed && inv.type == MSG_SPORK) {
|
||||
if(mapSporks.count(inv.hash)) {
|
||||
CDataStream ss(SER_NETWORK, PROTOCOL_VERSION);
|
||||
ss.reserve(1000);
|
||||
ss << mapSporks[inv.hash];
|
||||
@ -4529,10 +4520,8 @@ void static ProcessGetData(CNode* pfrom, const Consensus::Params& consensusParam
|
||||
}
|
||||
}
|
||||
|
||||
if (!pushed && inv.type == MSG_MASTERNODE_WINNER)
|
||||
{
|
||||
if(mnpayments.mapMasternodePayeeVotes.count(inv.hash))
|
||||
{
|
||||
if (!pushed && inv.type == MSG_MASTERNODE_WINNER) {
|
||||
if(mnpayments.mapMasternodePayeeVotes.count(inv.hash)) {
|
||||
CDataStream ss(SER_NETWORK, PROTOCOL_VERSION);
|
||||
ss.reserve(1000);
|
||||
ss << mnpayments.mapMasternodePayeeVotes[inv.hash];
|
||||
@ -4541,10 +4530,8 @@ void static ProcessGetData(CNode* pfrom, const Consensus::Params& consensusParam
|
||||
}
|
||||
}
|
||||
|
||||
if (!pushed && inv.type == MSG_GOVERNANCE_VOTE)
|
||||
{
|
||||
if(governance.mapVotesByHash.count(inv.hash))
|
||||
{
|
||||
if (!pushed && inv.type == MSG_GOVERNANCE_VOTE) {
|
||||
if(governance.mapVotesByHash.count(inv.hash)) {
|
||||
CDataStream ss(SER_NETWORK, PROTOCOL_VERSION);
|
||||
ss.reserve(1000);
|
||||
ss << governance.mapVotesByHash[inv.hash];
|
||||
@ -4553,10 +4540,8 @@ void static ProcessGetData(CNode* pfrom, const Consensus::Params& consensusParam
|
||||
}
|
||||
}
|
||||
|
||||
if (!pushed && inv.type == MSG_GOVERNANCE_OBJECT)
|
||||
{
|
||||
if(governance.mapObjects.count(inv.hash))
|
||||
{
|
||||
if (!pushed && inv.type == MSG_GOVERNANCE_OBJECT) {
|
||||
if(governance.mapObjects.count(inv.hash)) {
|
||||
CDataStream ss(SER_NETWORK, PROTOCOL_VERSION);
|
||||
ss.reserve(1000);
|
||||
ss << governance.mapObjects[inv.hash];
|
||||
@ -4575,10 +4560,8 @@ void static ProcessGetData(CNode* pfrom, const Consensus::Params& consensusParam
|
||||
}
|
||||
}
|
||||
|
||||
if (!pushed && inv.type == MSG_MASTERNODE_PING)
|
||||
{
|
||||
if(mnodeman.mapSeenMasternodePing.count(inv.hash))
|
||||
{
|
||||
if (!pushed && inv.type == MSG_MASTERNODE_PING) {
|
||||
if(mnodeman.mapSeenMasternodePing.count(inv.hash)) {
|
||||
CDataStream ss(SER_NETWORK, PROTOCOL_VERSION);
|
||||
ss.reserve(1000);
|
||||
ss << mnodeman.mapSeenMasternodePing[inv.hash];
|
||||
@ -4587,10 +4570,8 @@ void static ProcessGetData(CNode* pfrom, const Consensus::Params& consensusParam
|
||||
}
|
||||
}
|
||||
|
||||
if (!pushed && inv.type == MSG_DSTX)
|
||||
{
|
||||
if(mapDarksendBroadcastTxes.count(inv.hash))
|
||||
{
|
||||
if (!pushed && inv.type == MSG_DSTX) {
|
||||
if(mapDarksendBroadcastTxes.count(inv.hash)) {
|
||||
CDataStream ss(SER_NETWORK, PROTOCOL_VERSION);
|
||||
ss.reserve(1000);
|
||||
ss <<
|
||||
@ -6119,9 +6100,7 @@ bool SendMessages(CNode* pto)
|
||||
pto->mapAskFor.erase(pto->mapAskFor.begin());
|
||||
}
|
||||
if (!vGetData.empty())
|
||||
{
|
||||
pto->PushMessage(NetMsgType::GETDATA, vGetData);
|
||||
}
|
||||
|
||||
}
|
||||
return true;
|
||||
|
Loading…
Reference in New Issue
Block a user