Moved vote relaying into ProcessVote so that local votes are relayed

This commit is contained in:
Tim Flynn 2016-11-14 13:07:11 -05:00
parent c31ba8ba4c
commit fd1327031b

View File

@ -223,7 +223,6 @@ void CGovernanceManager::ProcessMessage(CNode* pfrom, std::string& strCommand, C
CGovernanceException exception; CGovernanceException exception;
if(ProcessVote(pfrom, vote, exception)) { if(ProcessVote(pfrom, vote, exception)) {
LogPrint("gobject", "CGovernanceManager -- Accepted vote\n"); LogPrint("gobject", "CGovernanceManager -- Accepted vote\n");
vote.Relay();
} }
else { else {
LogPrint("gobject", "CGovernanceManager -- Rejected vote, error = %s\n", exception.what()); LogPrint("gobject", "CGovernanceManager -- Rejected vote, error = %s\n", exception.what());
@ -638,6 +637,8 @@ bool CGovernanceManager::ProcessVote(CNode* pfrom, const CGovernanceVote& vote,
if(govobj.GetObjectType() == GOVERNANCE_OBJECT_WATCHDOG) { if(govobj.GetObjectType() == GOVERNANCE_OBJECT_WATCHDOG) {
mnodeman.UpdateWatchdogVoteTime(vote.GetVinMasternode()); mnodeman.UpdateWatchdogVoteTime(vote.GetVinMasternode());
} }
vote.Relay();
} }
return fOk; return fOk;
} }