check validity only for missing votes (#1720)

This commit is contained in:
UdjinM6 2017-11-11 10:02:26 +03:00 committed by GitHub
parent ec8178c40a
commit 28d833eca7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -795,10 +795,10 @@ void CGovernanceManager::Sync(CNode* pfrom, const uint256& nProp, const CBloomFi
std::vector<CGovernanceVote> vecVotes = govobj.GetVoteFile().GetVotes(); std::vector<CGovernanceVote> vecVotes = govobj.GetVoteFile().GetVotes();
for(size_t i = 0; i < vecVotes.size(); ++i) { for(size_t i = 0; i < vecVotes.size(); ++i) {
if(!vecVotes[i].IsValid(true)) { if(filter.contains(vecVotes[i].GetHash())) {
continue; continue;
} }
if(filter.contains(vecVotes[i].GetHash())) { if(!vecVotes[i].IsValid(true)) {
continue; continue;
} }
pfrom->PushInventory(CInv(MSG_GOVERNANCE_OBJECT_VOTE, vecVotes[i].GetHash())); pfrom->PushInventory(CInv(MSG_GOVERNANCE_OBJECT_VOTE, vecVotes[i].GetHash()));