![]() |
Dash Core
0.12.2.1
P2P Digital Currency
|
#include <governance-vote.h>
Public Member Functions | |
CGovernanceVote () | |
CGovernanceVote (COutPoint outpointMasternodeIn, uint256 nParentHashIn, vote_signal_enum_t eVoteSignalIn, vote_outcome_enum_t eVoteOutcomeIn) | |
bool | IsValid () const |
bool | IsSynced () const |
int64_t | GetTimestamp () const |
vote_signal_enum_t | GetSignal () const |
vote_outcome_enum_t | GetOutcome () const |
const uint256 & | GetParentHash () const |
void | SetTime (int64_t nTimeIn) |
void | SetSignature (const std::vector< unsigned char > &vchSigIn) |
bool | Sign (CKey &keyMasternode, CPubKey &pubKeyMasternode) |
bool | IsValid (bool fSignatureCheck) const |
void | Relay (CConnman &connman) const |
std::string | GetVoteString () const |
const COutPoint & | GetMasternodeOutpoint () const |
uint256 | GetHash () const |
std::string | ToString () const |
uint256 | GetTypeHash () const |
template<typename Stream , typename Operation > | |
void | SerializationOp (Stream &s, Operation ser_action, int nType, int nVersion) |
Public Attributes | |
ADD_SERIALIZE_METHODS | |
Private Attributes | |
bool | fValid |
bool | fSynced |
int | nVoteSignal |
CTxIn | vinMasternode |
uint256 | nParentHash |
int | nVoteOutcome |
int64_t | nTime |
std::vector< unsigned char > | vchSig |
Friends | |
bool | operator== (const CGovernanceVote &vote1, const CGovernanceVote &vote2) |
bool | operator< (const CGovernanceVote &vote1, const CGovernanceVote &vote2) |
Definition at line 88 of file governance-vote.h.
CGovernanceVote::CGovernanceVote | ( | ) |
Definition at line 205 of file governance-vote.cpp.
CGovernanceVote::CGovernanceVote | ( | COutPoint | outpointMasternodeIn, |
uint256 | nParentHashIn, | ||
vote_signal_enum_t | eVoteSignalIn, | ||
vote_outcome_enum_t | eVoteOutcomeIn | ||
) |
Definition at line 216 of file governance-vote.cpp.
|
inline |
GET UNIQUE HASH WITH DETERMINISTIC VALUE OF THIS SPECIFIC VOTE
Definition at line 140 of file governance-vote.h.
Referenced by CGovernanceManager::AddInvalidVote(), CGovernanceManager::AddOrphanVote(), CGovernanceObjectVoteFile::AddVote(), gobject(), IsValid(), CGovernanceObject::ProcessVote(), CGovernanceManager::ProcessVote(), CGovernanceObjectVoteFile::RebuildIndex(), and Relay().
|
inline |
Definition at line 132 of file governance-vote.h.
Referenced by CGovernanceObject::CheckOrphanVotes(), CGovernanceObject::ProcessVote(), and CGovernanceManager::ProcessVote().
|
inline |
Definition at line 116 of file governance-vote.h.
Referenced by CGovernanceObject::ProcessVote().
|
inline |
Definition at line 118 of file governance-vote.h.
Referenced by CGovernanceObject::ProcessVote(), and CGovernanceManager::ProcessVote().
|
inline |
Definition at line 114 of file governance-vote.h.
Referenced by CGovernanceObject::ProcessVote().
|
inline |
Definition at line 112 of file governance-vote.h.
Referenced by CGovernanceObject::ProcessVote().
|
inline |
GET HASH WITH DETERMINISTIC VALUE OF MASTERNODE-VIN/PARENT-HASH/VOTE-SIGNAL
This hash collides with previous masternode votes when they update their votes on governance objects. With 12.1 there's various types of votes (funding, valid, delete, etc), so this is the deterministic hash that will collide with the previous vote and allow the system to update.
We do not include an outcome, because that can change when a masternode updates their vote from yes to no on funding a specific project for example. We do not include a time because it will be updated each time the vote is updated, changing the hash
Definition at line 176 of file governance-vote.h.
|
inline |
Definition at line 128 of file governance-vote.h.
|
inline |
Definition at line 110 of file governance-vote.h.
|
inline |
Definition at line 108 of file governance-vote.h.
Referenced by CGovernanceObject::ProcessVote(), and voteraw().
bool CGovernanceVote::IsValid | ( | bool | fSignatureCheck | ) | const |
Definition at line 256 of file governance-vote.cpp.
void CGovernanceVote::Relay | ( | CConnman & | connman | ) | const |
Definition at line 227 of file governance-vote.cpp.
Referenced by CGovernanceObject::CheckOrphanVotes(), CGovernanceManager::CheckOrphanVotes(), and CGovernanceManager::ProcessVoteAndRelay().
|
inline |
Definition at line 192 of file governance-vote.h.
|
inline |
Definition at line 122 of file governance-vote.h.
Referenced by voteraw().
|
inline |
Definition at line 120 of file governance-vote.h.
Referenced by CGovernanceManager::GetCurrentVotes(), and voteraw().
Definition at line 233 of file governance-vote.cpp.
Referenced by gobject().
|
inline |
Definition at line 151 of file governance-vote.h.
|
friend |
Definition at line 307 of file governance-vote.cpp.
|
friend |
Definition at line 297 of file governance-vote.cpp.
CGovernanceVote::ADD_SERIALIZE_METHODS |
Definition at line 189 of file governance-vote.h.
|
private |
Definition at line 96 of file governance-vote.h.
|
private |
Definition at line 95 of file governance-vote.h.
|
private |
Definition at line 99 of file governance-vote.h.
Referenced by IsValid(), operator<(), operator==(), and Sign().
|
private |
Definition at line 101 of file governance-vote.h.
Referenced by IsValid(), operator<(), operator==(), and Sign().
|
private |
Definition at line 100 of file governance-vote.h.
Referenced by IsValid(), operator<(), operator==(), and Sign().
|
private |
Definition at line 97 of file governance-vote.h.
Referenced by IsValid(), operator<(), operator==(), and Sign().
|
private |
Definition at line 102 of file governance-vote.h.
|
private |
Definition at line 98 of file governance-vote.h.
Referenced by IsValid(), operator<(), operator==(), and Sign().