Dash Core Source Documentation (0.16.0.1)

Find detailed information regarding the Dash Core source code.

#include <governance-vote.h>

+ Collaboration diagram for CGovernanceVote:

Public Member Functions

 CGovernanceVote ()
 
 CGovernanceVote (const COutPoint &outpointMasternodeIn, const 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 uint256GetParentHash () const
 
void SetTime (int64_t nTimeIn)
 
void SetSignature (const std::vector< unsigned char > &vchSigIn)
 
bool Sign (const CKey &key, const CKeyID &keyID)
 
bool CheckSignature (const CKeyID &keyID) const
 
bool Sign (const CBLSSecretKey &key)
 
bool CheckSignature (const CBLSPublicKey &pubKey) const
 
bool IsValid (bool useVotingKey) const
 
void Relay (CConnman &connman) const
 
const COutPointGetMasternodeOutpoint () const
 
uint256 GetHash () const
 GetHash() More...
 
uint256 GetSignatureHash () const
 
std::string ToString () const
 
template<typename Stream , typename Operation >
void SerializationOp (Stream &s, Operation ser_action)
 

Public Attributes

 ADD_SERIALIZE_METHODS
 

Private Member Functions

void UpdateHash () const
 

Private Attributes

bool fValid
 
bool fSynced
 
int nVoteSignal
 
COutPoint masternodeOutpoint
 
uint256 nParentHash
 
int nVoteOutcome
 
int64_t nTime
 
std::vector< unsigned char > vchSig
 
const uint256 hash
 Memory only. More...
 

Friends

bool operator== (const CGovernanceVote &vote1, const CGovernanceVote &vote2)
 
bool operator< (const CGovernanceVote &vote1, const CGovernanceVote &vote2)
 

Detailed Description

Definition at line 54 of file governance-vote.h.

Constructor & Destructor Documentation

◆ CGovernanceVote() [1/2]

CGovernanceVote::CGovernanceVote ( )

Definition at line 80 of file governance-vote.cpp.

◆ CGovernanceVote() [2/2]

CGovernanceVote::CGovernanceVote ( const COutPoint outpointMasternodeIn,
const uint256 nParentHashIn,
vote_signal_enum_t  eVoteSignalIn,
vote_outcome_enum_t  eVoteOutcomeIn 
)

Definition at line 92 of file governance-vote.cpp.

References UpdateHash().

Member Function Documentation

◆ CheckSignature() [1/2]

◆ CheckSignature() [2/2]

bool CGovernanceVote::CheckSignature ( const CBLSPublicKey pubKey) const

◆ GetHash()

◆ GetMasternodeOutpoint()

const COutPoint& CGovernanceVote::GetMasternodeOutpoint ( ) const
inline

◆ GetOutcome()

vote_outcome_enum_t CGovernanceVote::GetOutcome ( ) const
inline

Definition at line 86 of file governance-vote.h.

References nVoteOutcome.

Referenced by CGovernanceObject::ProcessVote(), and ToString().

◆ GetParentHash()

const uint256& CGovernanceVote::GetParentHash ( ) const
inline

◆ GetSignal()

vote_signal_enum_t CGovernanceVote::GetSignal ( ) const
inline

◆ GetSignatureHash()

uint256 CGovernanceVote::GetSignatureHash ( ) const

Definition at line 158 of file governance-vote.cpp.

References SerializeHash().

Referenced by CheckSignature(), and Sign().

◆ GetTimestamp()

int64_t CGovernanceVote::GetTimestamp ( ) const
inline

Definition at line 82 of file governance-vote.h.

References nTime.

Referenced by CGovernanceObject::ProcessVote(), and CGovernanceObjectVoteFile::RemoveOldVotes().

◆ IsSynced()

bool CGovernanceVote::IsSynced ( ) const
inline

Definition at line 80 of file governance-vote.h.

References fSynced.

◆ IsValid() [1/2]

bool CGovernanceVote::IsValid ( ) const
inline

Definition at line 78 of file governance-vote.h.

References fValid.

Referenced by CGovernanceObject::ProcessVote(), and voteraw().

◆ IsValid() [2/2]

◆ Relay()

◆ SerializationOp()

template<typename Stream , typename Operation >
void CGovernanceVote::SerializationOp ( Stream &  s,
Operation  ser_action 
)
inline

◆ SetSignature()

void CGovernanceVote::SetSignature ( const std::vector< unsigned char > &  vchSigIn)
inline

Definition at line 96 of file governance-vote.h.

References vchSig.

Referenced by voteraw().

◆ SetTime()

void CGovernanceVote::SetTime ( int64_t  nTimeIn)
inline

◆ Sign() [1/2]

◆ Sign() [2/2]

◆ ToString()

◆ UpdateHash()

void CGovernanceVote::UpdateHash ( ) const
private

Friends And Related Function Documentation

◆ operator<

bool operator< ( const CGovernanceVote vote1,
const CGovernanceVote vote2 
)
friend

Definition at line 290 of file governance-vote.cpp.

◆ operator==

bool operator== ( const CGovernanceVote vote1,
const CGovernanceVote vote2 
)
friend

Definition at line 280 of file governance-vote.cpp.

Member Data Documentation

◆ ADD_SERIALIZE_METHODS

CGovernanceVote::ADD_SERIALIZE_METHODS

Definition at line 118 of file governance-vote.h.

◆ fSynced

bool CGovernanceVote::fSynced
private

Definition at line 62 of file governance-vote.h.

Referenced by IsSynced().

◆ fValid

bool CGovernanceVote::fValid
private

Definition at line 61 of file governance-vote.h.

Referenced by IsValid().

◆ hash

const uint256 CGovernanceVote::hash
private

Memory only.

Definition at line 71 of file governance-vote.h.

Referenced by CheckSignature(), GetHash(), Sign(), and UpdateHash().

◆ masternodeOutpoint

COutPoint CGovernanceVote::masternodeOutpoint
private

◆ nParentHash

uint256 CGovernanceVote::nParentHash
private

◆ nTime

int64_t CGovernanceVote::nTime
private

◆ nVoteOutcome

int CGovernanceVote::nVoteOutcome
private

◆ nVoteSignal

int CGovernanceVote::nVoteSignal
private

◆ vchSig

std::vector<unsigned char> CGovernanceVote::vchSig
private

Definition at line 68 of file governance-vote.h.

Referenced by CheckSignature(), SerializationOp(), SetSignature(), and Sign().


The documentation for this class was generated from the following files:
Released under the MIT license