mirror of
https://github.com/dashpay/dash.git
synced 2024-12-27 04:52:59 +01:00
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:
parent
02efeb0c74
commit
038b31c796
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -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);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user