diff --git a/src/darksend.cpp b/src/darksend.cpp index 795ce10db..d26c73646 100644 --- a/src/darksend.cpp +++ b/src/darksend.cpp @@ -1558,7 +1558,6 @@ bool CDarksendPool::DoAutomaticDenominating(bool fDryRun) } else { LogPrintf("CDarksendPool::DoAutomaticDenominating -- can't connect, addr=%s\n", pmn->addr.ToString()); strAutoDenomResult = _("Error connecting to Masternode."); - pmn->IncreasePoSeBanScore(); continue; } } @@ -1611,7 +1610,6 @@ bool CDarksendPool::DoAutomaticDenominating(bool fDryRun) } else { LogPrintf("CDarksendPool::DoAutomaticDenominating -- can't connect, addr=%s\n", pmn->addr.ToString()); nTries++; - pmn->IncreasePoSeBanScore(); continue; } } diff --git a/src/masternodeman.cpp b/src/masternodeman.cpp index e03ee4ec8..b7480ef42 100644 --- a/src/masternodeman.cpp +++ b/src/masternodeman.cpp @@ -969,27 +969,19 @@ bool CMasternodeMan::SendVerifyRequest(const CAddress& addr, const std::vectornHeight - 1); - mWeAskedForVerification[addr] = mnv; - LogPrintf("CMasternodeMan::SendVerifyRequest -- verifying using nonce %d addr=%s\n", mnv.nonce, addr.ToString()); - pnode->PushMessage(NetMsgType::MNVERIFY, mnv); - return true; - } else { - // can't connect, add some PoSe "ban score" to all masternodes with given addr - bool fFound = false; - BOOST_FOREACH(CMasternode* pmn, vSortedByAddr) { - if(pmn->addr != addr) { - if(fFound) break; - continue; - } - fFound = true; - pmn->IncreasePoSeBanScore(); - } + if(pnode == NULL) { + LogPrintf("CMasternodeMan::SendVerifyRequest -- can't connect to node to verify it, addr=%s\n", addr.ToString()); return false; } + + netfulfilledman.AddFulfilledRequest(addr, strprintf("%s", NetMsgType::MNVERIFY)+"-request"); + // use random nonce, store it and require node to reply with correct one later + CMasternodeVerification mnv(addr, GetRandInt(999999), pCurrentBlockIndex->nHeight - 1); + mWeAskedForVerification[addr] = mnv; + LogPrintf("CMasternodeMan::SendVerifyRequest -- verifying node using nonce %d addr=%s\n", mnv.nonce, addr.ToString()); + pnode->PushMessage(NetMsgType::MNVERIFY, mnv); + + return true; } void CMasternodeMan::SendVerifyReply(CNode* pnode, CMasternodeVerification& mnv)