governance: Notify main signals in ProcessVote instead ProcessMessage (#3795)

Thats to also call `NotifyGovernanceVote` for votes added by RPC not only the ones coming from P2P.
This commit is contained in:
dustinface 2020-11-09 22:58:04 +01:00 committed by GitHub
parent 02efeb0c74
commit 038b31c796
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -12,6 +12,7 @@
#include <messagesigner.h> #include <messagesigner.h>
#include <spork.h> #include <spork.h>
#include <validation.h> #include <validation.h>
#include <validationinterface.h>
#include <string> #include <string>
@ -210,6 +211,8 @@ bool CGovernanceObject::ProcessVote(CNode* pfrom,
voteInstanceRef = vote_instance_t(vote.GetOutcome(), nVoteTimeUpdate, vote.GetTimestamp()); voteInstanceRef = vote_instance_t(vote.GetOutcome(), nVoteTimeUpdate, vote.GetTimestamp());
fileVotes.AddVote(vote); fileVotes.AddVote(vote);
fDirtyCache = true; fDirtyCache = true;
// SEND NOTIFICATION TO SCRIPT/ZMQ
GetMainSignals().NotifyGovernanceVote(vote);
return true; return true;
} }

View File

@ -15,7 +15,6 @@
#include <netmessagemaker.h> #include <netmessagemaker.h>
#include <spork.h> #include <spork.h>
#include <validation.h> #include <validation.h>
#include <validationinterface.h>
CGovernanceManager governance; CGovernanceManager governance;
@ -255,8 +254,6 @@ void CGovernanceManager::ProcessMessage(CNode* pfrom, const std::string& strComm
} }
return; return;
} }
// SEND NOTIFICATION TO SCRIPT/ZMQ
GetMainSignals().NotifyGovernanceVote(vote);
} }
} }