Dash Core Source Documentation (0.16.0.1)
Find detailed information regarding the Dash Core source code.
governance-object.h
Go to the documentation of this file.
62 vote_instance_t(vote_outcome_enum_t eOutcomeIn = VOTE_OUTCOME_NONE, int64_t nTimeIn = 0, int64_t nCreationTimeIn = 0) :
183 CGovernanceObject(const uint256& nHashParentIn, int nRevisionIn, int64_t nTime, const uint256& nCollateralHashIn, const std::string& strDataHexIn);
266 bool IsValidLocally(std::string& strError, bool& fMissingConfirmations, bool fCheckCollateral) const;
293 int CountMatchingVotes(vote_signal_enum_t eVoteSignalIn, vote_outcome_enum_t eVoteOutcomeIn) const;
328 LogPrint(BCLog::GOBJECT, "CGovernanceObject::SerializationOp Reading/writing votes from/to disk\n");
333 LogPrint(BCLog::GOBJECT, "CGovernanceObject::SerializationOp hash = %s, vote count = %d\n", GetHash().ToString(), fileVotes.GetVoteCount());
bool IsCollateralValid(std::string &strError, bool &fMissingConfirmations) const
Check the collateral transaction for the budget proposal/finalized budget.
Definition: governance-object.cpp:505
Map like container that keeps the N most recently added items.
Definition: cachemultimap.h:21
static const int64_t GOVERNANCE_FEE_CONFIRMATIONS
Definition: governance-object.h:38
static const int64_t GOVERNANCE_ORPHAN_EXPIRATION_TIME
Definition: governance-object.h:42
void SerializationOp(Stream &s, Operation ser_action)
Definition: governance-object.h:72
Definition: bls.h:238
std::pair< CGovernanceVote, int64_t > vote_time_pair_t
Definition: governance-object.h:50
int GetAbstainCount(vote_signal_enum_t eVoteSignalIn) const
Definition: governance-object.cpp:633
const CGovernanceObjectVoteFile & GetVoteFile() const
Definition: governance-object.h:249
static const int MIN_GOVERNANCE_PEER_PROTO_VERSION
Definition: governance-object.h:26
Definition: governance-vote.h:54
const COutPoint & GetMasternodeOutpoint() const
Definition: governance-object.h:209
bool CheckSignature(const CBLSPublicKey &pubKey) const
Definition: governance-object.cpp:316
static const CAmount GOVERNANCE_PROPOSAL_FEE_TX
Definition: governance-object.h:36
std::string strLocalValidityError
Definition: governance-object.h:149
Definition: univalue.h:20
void SetMasternodeOutpoint(const COutPoint &outpoint)
Definition: governance-object.cpp:301
const uint256 & GetCollateralHash() const
Definition: governance-object.h:204
static const int64_t GOVERNANCE_MIN_RELAY_FEE_CONFIRMATIONS
Definition: governance-object.h:39
static const int GOVERNANCE_OBJECT_PROPOSAL
Definition: governance-object.h:33
void PrepareDeletion(int64_t nDeletionTime_)
Definition: governance-object.h:275
bool IsSetCachedFunding() const
Definition: governance-object.h:214
Definition: governance-object.h:57
static const int SEEN_OBJECT_ERROR_INVALID
Definition: governance-object.h:46
bool IsSetCachedEndorsed() const
Definition: governance-object.h:229
static const double GOVERNANCE_FILTER_FP_RATE
Definition: governance-object.h:30
void SerializationOp(Stream &s, Operation ser_action)
Definition: governance-object.h:96
bool fCachedFunding
true == minimum network support has been reached for this object to be funded (doesn't mean it will f...
Definition: governance-object.h:154
UniValue GetJSONObject()
Return the actual object from the vchData JSON structure.
Definition: governance-object.cpp:332
bool ProcessVote(CNode *pfrom, const CGovernanceVote &vote, CGovernanceException &exception, CConnman &connman)
Definition: governance-object.cpp:100
Definition: governance-object.h:90
int GetNoCount(vote_signal_enum_t eVoteSignalIn) const
Definition: governance-object.cpp:628
static const int GOVERNANCE_POSE_BANNED_VOTES_VERSION
Definition: governance-object.h:28
std::set< uint256 > RemoveInvalidVotes(const COutPoint &mnOutpoint)
Definition: governance-object.cpp:237
Definition: bls.h:263
bool fCachedValid
true == minimum network has been reached flagging this object as a valid and understood governance ob...
Definition: governance-object.h:157
Definition: governance.h:151
std::map< COutPoint, vote_rec_t > vote_m_t
Definition: governance-object.h:110
Definition: util.h:134
bool IsSetCachedDelete() const
Definition: governance-object.h:224
static const int GOVERNANCE_OBJECT_TRIGGER
Definition: governance-object.h:34
int GetAbsoluteNoCount(vote_signal_enum_t eVoteSignalIn) const
Definition: governance-object.cpp:618
std::map< int, vote_instance_t > vote_instance_m_t
Definition: governance-object.h:84
A class which encapsulates information about a governance exception condition.
Definition: governance-exceptions.h:55
An outpoint - a combination of a transaction hash and an index n into its vout.
Definition: transaction.h:26
static const int GOVERNANCE_FILTER_PROTO_VERSION
Definition: governance-object.h:27
uint256 GetSignatureHash() const
Definition: governance-object.cpp:296
int64_t GetCreationTime() const
Definition: governance-object.h:189
std::vector< unsigned char > vchData
Data field - can be used for anything.
Definition: governance-object.h:141
bool IsValidLocally(std::string &strError, bool fCheckCollateral) const
Definition: governance-object.cpp:430
std::string GetDataAsPlainString() const
Definition: governance-object.cpp:417
vote_instance_t(vote_outcome_enum_t eOutcomeIn=VOTE_OUTCOME_NONE, int64_t nTimeIn=0, int64_t nCreationTimeIn=0)
Definition: governance-object.h:62
void UpdateSentinelVariables()
Definition: governance-object.cpp:662
void ClearMasternodeVotes()
Called when MN's which have voted on this object have been removed.
Definition: governance-object.cpp:219
int GetAbsoluteYesCount(vote_signal_enum_t eVoteSignalIn) const
Get specific vote counts for each outcome (funding, validity, etc)
Definition: governance-object.cpp:613
CAmount GetMinCollateralFee() const
Definition: governance-object.cpp:492
void SerializationOp(Stream &s, Operation ser_action)
Definition: governance-object.h:313
int GetYesCount(vote_signal_enum_t eVoteSignalIn) const
Definition: governance-object.cpp:623
static const int GOVERNANCE_OBJECT_UNKNOWN
Definition: governance-object.h:32
CacheMultiMap< COutPoint, vote_time_pair_t > vote_cmm_t
Definition: governance-object.h:116
int CountMatchingVotes(vote_signal_enum_t eVoteSignalIn, vote_outcome_enum_t eVoteOutcomeIn) const
Definition: governance-object.cpp:594
Represents the collection of votes associated with a given CGovernanceObject Recently received votes ...
Definition: governance-votedb.h:24
static const int64_t GOVERNANCE_DELETION_DELAY
Definition: governance-object.h:41
bool fCachedEndorsed
true == minimum network support has been reached flagging this object as endorsed by an elected repre...
Definition: governance-object.h:165
void UpdateLocalValidity()
Definition: governance-object.cpp:422
Definition: governance-vote.h:17
bool fDirtyCache
object was updated and cached values should be updated soon
Definition: governance-object.h:168
bool operator<(const vote_time_pair_t &p1, const vote_time_pair_t &p2)
Definition: governance-object.h:52
Definition: serialize.h:162
bool fCachedDelete
true == minimum network support has been reached saying this object should be deleted from the system...
Definition: governance-object.h:160
Wrapped mutex: supports recursive locking, but no waiting TODO: We should move away from using the re...
Definition: sync.h:94
CCriticalSection cs
critical section to protect the inner data structures
Definition: governance-object.h:120
bool GetCurrentMNVotes(const COutPoint &mnCollateralOutpoint, vote_rec_t &voteRecord) const
Definition: governance-object.cpp:638
vote_instance_m_t::const_iterator vote_instance_m_cit
Definition: governance-object.h:88
Definition: serialize.h:161
int64_t GetDeletionTime() const
Definition: governance-object.h:194