Dash Core Source Documentation (0.16.0.1)

Find detailed information regarding the Dash Core source code.

Trigger : Superblock. More...

#include <governance-classes.h>

+ Inheritance diagram for CSuperblock:
+ Collaboration diagram for CSuperblock:

Public Member Functions

 CSuperblock ()
 
 CSuperblock (uint256 &nHash)
 
int GetStatus ()
 
void SetStatus (int nStatusIn)
 
void SetExecuted ()
 
CGovernanceObjectGetGovernanceObject ()
 
int GetBlockHeight ()
 
int CountPayments ()
 
bool GetPayment (int nPaymentIndex, CGovernancePayment &paymentRet)
 
CAmount GetPaymentsTotalAmount ()
 
bool IsValid (const CTransaction &txNew, int nBlockHeight, CAmount blockReward)
 Is Transaction Valid. More...
 
bool IsExpired () const
 
- Public Member Functions inherited from CGovernanceObject
 CGovernanceObject ()
 
 CGovernanceObject (const uint256 &nHashParentIn, int nRevisionIn, int64_t nTime, const uint256 &nCollateralHashIn, const std::string &strDataHexIn)
 
 CGovernanceObject (const CGovernanceObject &other)
 
int64_t GetCreationTime () const
 
int64_t GetDeletionTime () const
 
int GetObjectType () const
 
const uint256GetCollateralHash () const
 
const COutPointGetMasternodeOutpoint () const
 
bool IsSetCachedFunding () const
 
bool IsSetCachedValid () const
 
bool IsSetCachedDelete () const
 
bool IsSetCachedEndorsed () const
 
bool IsSetDirtyCache () const
 
bool IsSetExpired () const
 
void SetExpired ()
 
const CGovernanceObjectVoteFileGetVoteFile () const
 
void SetMasternodeOutpoint (const COutPoint &outpoint)
 
bool Sign (const CBLSSecretKey &key)
 
bool CheckSignature (const CBLSPublicKey &pubKey) const
 
uint256 GetSignatureHash () const
 
bool IsValidLocally (std::string &strError, bool fCheckCollateral) const
 
bool IsValidLocally (std::string &strError, bool &fMissingConfirmations, bool fCheckCollateral) const
 
bool IsCollateralValid (std::string &strError, bool &fMissingConfirmations) const
 Check the collateral transaction for the budget proposal/finalized budget. More...
 
void UpdateLocalValidity ()
 
void UpdateSentinelVariables ()
 
void PrepareDeletion (int64_t nDeletionTime_)
 
CAmount GetMinCollateralFee () const
 
UniValue GetJSONObject ()
 Return the actual object from the vchData JSON structure. More...
 
void Relay (CConnman &connman)
 
uint256 GetHash () const
 
int CountMatchingVotes (vote_signal_enum_t eVoteSignalIn, vote_outcome_enum_t eVoteOutcomeIn) const
 
int GetAbsoluteYesCount (vote_signal_enum_t eVoteSignalIn) const
 Get specific vote counts for each outcome (funding, validity, etc) More...
 
int GetAbsoluteNoCount (vote_signal_enum_t eVoteSignalIn) const
 
int GetYesCount (vote_signal_enum_t eVoteSignalIn) const
 
int GetNoCount (vote_signal_enum_t eVoteSignalIn) const
 
int GetAbstainCount (vote_signal_enum_t eVoteSignalIn) const
 
bool GetCurrentMNVotes (const COutPoint &mnCollateralOutpoint, vote_rec_t &voteRecord) const
 
std::string GetDataAsHexString () const
 

GetData - As

More...
 
std::string GetDataAsPlainString () const
 
template<typename Stream , typename Operation >
void SerializationOp (Stream &s, Operation ser_action)
 
void LoadData ()
 

LoadData

More...
 
void GetData (UniValue &objResult)
 

GetData - Example usage:

More...
 
bool ProcessVote (CNode *pfrom, const CGovernanceVote &vote, CGovernanceException &exception, CConnman &connman)
 
void ClearMasternodeVotes ()
 Called when MN's which have voted on this object have been removed. More...
 
std::set< uint256RemoveInvalidVotes (const COutPoint &mnOutpoint)
 

Static Public Member Functions

static bool IsValidBlockHeight (int nBlockHeight)
 Is Valid Superblock Height. More...
 
static void GetNearestSuperblocksHeights (int nBlockHeight, int &nLastSuperblockRet, int &nNextSuperblockRet)
 
static CAmount GetPaymentsLimit (int nBlockHeight)
 

Private Member Functions

void ParsePaymentSchedule (const std::string &strPaymentAddresses, const std::string &strPaymentAmounts)
 

Private Attributes

uint256 nGovObjHash
 
int nBlockHeight
 
int nStatus
 
std::vector< CGovernancePaymentvecPayments
 

Additional Inherited Members

- Public Types inherited from CGovernanceObject
typedef std::map< COutPoint, vote_rec_tvote_m_t
 
typedef vote_m_t::iterator vote_m_it
 
typedef vote_m_t::const_iterator vote_m_cit
 
typedef CacheMultiMap< COutPoint, vote_time_pair_tvote_cmm_t
 
- Public Attributes inherited from CGovernanceObject
 ADD_SERIALIZE_METHODS
 

Detailed Description

Trigger : Superblock.

  • Create payments on the network

object structure: { "governance_object_id" : last_id, "type" : govtypes.trigger, "subtype" : "superblock", "superblock_name" : superblock_name, "start_epoch" : start_epoch, "payment_addresses" : "addr1|addr2|addr3", "payment_amounts" : "amount1|amount2|amount3" }

Definition at line 131 of file governance-classes.h.

Constructor & Destructor Documentation

◆ CSuperblock() [1/2]

CSuperblock::CSuperblock ( )

Definition at line 389 of file governance-classes.cpp.

◆ CSuperblock() [2/2]

Member Function Documentation

◆ CountPayments()

int CSuperblock::CountPayments ( )
inline

Definition at line 168 of file governance-classes.h.

References vecPayments.

Referenced by GetPaymentsTotalAmount(), and IsValid().

◆ GetBlockHeight()

int CSuperblock::GetBlockHeight ( )
inline

Definition at line 163 of file governance-classes.h.

References nBlockHeight.

◆ GetGovernanceObject()

CGovernanceObject* CSuperblock::GetGovernanceObject ( )
inline

◆ GetNearestSuperblocksHeights()

void CSuperblock::GetNearestSuperblocksHeights ( int  nBlockHeight,
int &  nLastSuperblockRet,
int &  nNextSuperblockRet 
)
static

◆ GetPayment()

bool CSuperblock::GetPayment ( int  nPaymentIndex,
CGovernancePayment paymentRet 
)

Definition at line 552 of file governance-classes.cpp.

References vecPayments.

Referenced by IsValid().

◆ GetPaymentsLimit()

◆ GetPaymentsTotalAmount()

CAmount CSuperblock::GetPaymentsTotalAmount ( )

Definition at line 562 of file governance-classes.cpp.

References CountPayments(), and vecPayments.

Referenced by IsValid().

◆ GetStatus()

int CSuperblock::GetStatus ( )
inline

Definition at line 150 of file governance-classes.h.

References nStatus.

◆ IsExpired()

◆ IsValid()

◆ IsValidBlockHeight()

bool CSuperblock::IsValidBlockHeight ( int  nBlockHeight)
static

◆ ParsePaymentSchedule()

void CSuperblock::ParsePaymentSchedule ( const std::string &  strPaymentAddresses,
const std::string &  strPaymentAmounts 
)
private

◆ SetExecuted()

void CSuperblock::SetExecuted ( )
inline

Definition at line 154 of file governance-classes.h.

References nStatus, and SEEN_OBJECT_EXECUTED.

◆ SetStatus()

void CSuperblock::SetStatus ( int  nStatusIn)
inline

Definition at line 151 of file governance-classes.h.

References nStatus.

Member Data Documentation

◆ nBlockHeight

int CSuperblock::nBlockHeight
private

◆ nGovObjHash

uint256 CSuperblock::nGovObjHash
private

Definition at line 134 of file governance-classes.h.

Referenced by GetGovernanceObject().

◆ nStatus

int CSuperblock::nStatus
private

Definition at line 137 of file governance-classes.h.

Referenced by GetStatus(), IsExpired(), SetExecuted(), and SetStatus().

◆ vecPayments

std::vector<CGovernancePayment> CSuperblock::vecPayments
private

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