From 038b31c796e512681120eb92d0875ab9619d5bdd Mon Sep 17 00:00:00 2001 From: dustinface <35775977+xdustinface@users.noreply.github.com> Date: Mon, 9 Nov 2020 22:58:04 +0100 Subject: [PATCH] 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. --- src/governance/governance-object.cpp | 3 +++ src/governance/governance.cpp | 3 --- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/governance/governance-object.cpp b/src/governance/governance-object.cpp index 989a1b89ca..d46c89309c 100644 --- a/src/governance/governance-object.cpp +++ b/src/governance/governance-object.cpp @@ -12,6 +12,7 @@ #include #include #include +#include #include @@ -210,6 +211,8 @@ bool CGovernanceObject::ProcessVote(CNode* pfrom, voteInstanceRef = vote_instance_t(vote.GetOutcome(), nVoteTimeUpdate, vote.GetTimestamp()); fileVotes.AddVote(vote); fDirtyCache = true; + // SEND NOTIFICATION TO SCRIPT/ZMQ + GetMainSignals().NotifyGovernanceVote(vote); return true; } diff --git a/src/governance/governance.cpp b/src/governance/governance.cpp index 2e0eed93f7..038f33bf58 100644 --- a/src/governance/governance.cpp +++ b/src/governance/governance.cpp @@ -15,7 +15,6 @@ #include #include #include -#include CGovernanceManager governance; @@ -255,8 +254,6 @@ void CGovernanceManager::ProcessMessage(CNode* pfrom, const std::string& strComm } return; } - // SEND NOTIFICATION TO SCRIPT/ZMQ - GetMainSignals().NotifyGovernanceVote(vote); } }