Dash Core Source Documentation (0.16.0.1)
Find detailed information regarding the Dash Core source code.
governance-vote.cpp
Go to the documentation of this file.
92 CGovernanceVote::CGovernanceVote(const COutPoint& outpointMasternodeIn, const uint256& nParentHashIn, vote_signal_enum_t eVoteSignalIn, vote_outcome_enum_t eVoteOutcomeIn) :
129 // When this vote is from non-valid (PoSe banned) MN, we should only announce it to v0.14.0.1 nodes as older nodes
145 ss << masternodeOutpoint << uint8_t{} << 0xffffffff; // adding dummy values here to match old hashing format
181 std::string strMessage = masternodeOutpoint.ToStringShort() + "|" + nParentHash.ToString() + "|" +
207 LogPrint(BCLog::GOBJECT, "CGovernanceVote::IsValid -- VerifyHash() failed, error: %s\n", strError);
211 std::string strMessage = masternodeOutpoint.ToStringShort() + "|" + nParentHash.ToString() + "|" +
217 LogPrint(BCLog::GOBJECT, "CGovernanceVote::IsValid -- VerifyMessage() failed, error: %s\n", strError);
251 LogPrint(BCLog::GOBJECT, "CGovernanceVote::IsValid -- vote is too far ahead of current time - %s - nTime %lli - Max Time %lli\n", GetHash().ToString(), nTime, GetAdjustedTime() + (60 * 60));
257 LogPrint(BCLog::GOBJECT, "CGovernanceVote::IsValid -- Client attempted to vote on invalid signal(%d) - %s\n", nVoteSignal, GetHash().ToString());
263 LogPrint(BCLog::GOBJECT, "CGovernanceVote::IsValid -- Client attempted to vote on invalid outcome(%d) - %s\n", nVoteSignal, GetHash().ToString());
269 LogPrint(BCLog::GOBJECT, "CGovernanceVote::IsValid -- Unknown Masternode - %s\n", masternodeOutpoint.ToStringShort());
static bool VerifyHash(const uint256 &hash, const CPubKey &pubkey, const std::vector< unsigned char > &vchSig, std::string &strErrorRet)
Verify the hash signature, returns true if succcessful.
Definition: messagesigner.cpp:52
Definition: protocol.h:411
Definition: governance-vote.h:27
bool operator<(const CGovernanceVote &vote1, const CGovernanceVote &vote2)
Definition: governance-vote.cpp:290
Definition: bls.h:238
Definition: governance-vote.h:28
static const int MIN_GOVERNANCE_PEER_PROTO_VERSION
Definition: governance-object.h:26
Definition: governance-vote.h:54
static bool SignHash(const uint256 &hash, const CKey &key, std::vector< unsigned char > &vchSigRet)
Sign the hash, returns true if successful.
Definition: messagesigner.cpp:47
bool VerifyInsecure(const CBLSPublicKey &pubKey, const uint256 &hash) const
Definition: bls.cpp:335
static vote_signal_enum_t ConvertVoteSignal(const std::string &strVoteSignal)
Definition: governance-vote.cpp:64
Definition: governance-vote.h:18
static std::string ConvertOutcomeToString(vote_outcome_enum_t nOutcome)
Definition: governance-vote.cpp:14
std::unique_ptr< CDeterministicMNManager > deterministicMNManager
Definition: deterministicmns.cpp:24
static bool VerifyMessage(const CPubKey &pubkey, const std::vector< unsigned char > &vchSig, const std::string &strMessage, std::string &strErrorRet)
Verify the message signature, returns true if succcessful.
Definition: messagesigner.cpp:33
static bool SignMessage(const std::string &strMessage, std::vector< unsigned char > &vchSigRet, const CKey &key)
Sign the message, returns true if successful.
Definition: messagesigner.cpp:24
uint256 SerializeHash(const T &obj, int nType=SER_GETHASH, int nVersion=PROTOCOL_VERSION)
Compute the 256-bit hash of an object's serialization.
Definition: hash.h:254
uint256 GetSignatureHash() const
Definition: governance-vote.cpp:158
static const int GOVERNANCE_POSE_BANNED_VOTES_VERSION
Definition: governance-object.h:28
Definition: bls.h:263
Definition: bls.h:286
Definition: util.h:134
bool CheckSignature(const CKeyID &keyID) const
Definition: governance-vote.cpp:198
Definition: governance-vote.h:20
An outpoint - a combination of a transaction hash and an index n into its vout.
Definition: transaction.h:26
bool operator==(const CGovernanceVote &vote1, const CGovernanceVote &vote2)
Definition: governance-vote.cpp:280
Definition: governance-vote.h:29
Definition: governance-vote.h:19
Definition: governance-vote.h:26
const CChainParams & Params()
Return the currently selected parameters.
Definition: chainparams.cpp:947
void RelayInv(CInv &inv, const int minProtoVersion=MIN_PEER_PROTO_VERSION, bool fAllowMasternodeConnections=false)
Definition: net.cpp:3482
bool Sign(const CKey &key, const CKeyID &keyID)
Definition: governance-vote.cpp:163
static std::string ConvertSignalToString(vote_signal_enum_t nSignal)
Definition: governance-vote.cpp:30
Definition: governance-vote.h:17
Definition: serialize.h:162
static vote_outcome_enum_t ConvertVoteOutcome(const std::string &strVoteOutcome)
Definition: governance-vote.cpp:47
Definition: governance-vote.h:30