Dash Core  0.12.2.1
P2P Digital Currency
CMasternodePayments Class Reference

#include <masternode-payments.h>

Public Member Functions

 CMasternodePayments ()
 
template<typename Stream , typename Operation >
void SerializationOp (Stream &s, Operation ser_action, int nType, int nVersion)
 
void Clear ()
 
bool AddPaymentVote (const CMasternodePaymentVote &vote)
 
bool HasVerifiedPaymentVote (uint256 hashIn)
 
bool ProcessBlock (int nBlockHeight, CConnman &connman)
 
void CheckPreviousBlockVotes (int nPrevBlockHeight)
 
void Sync (CNode *node, CConnman &connman)
 
void RequestLowDataPaymentBlocks (CNode *pnode, CConnman &connman)
 
void CheckAndRemove ()
 
bool GetBlockPayee (int nBlockHeight, CScript &payee)
 
bool IsTransactionValid (const CTransaction &txNew, int nBlockHeight)
 
bool IsScheduled (CMasternode &mn, int nNotBlockHeight)
 
bool CanVote (COutPoint outMasternode, int nBlockHeight)
 
int GetMinMasternodePaymentsProto ()
 
void ProcessMessage (CNode *pfrom, std::string &strCommand, CDataStream &vRecv, CConnman &connman)
 
std::string GetRequiredPaymentsString (int nBlockHeight)
 
void FillBlockPayee (CMutableTransaction &txNew, int nBlockHeight, CAmount blockReward, CTxOut &txoutMasternodeRet)
 
std::string ToString () const
 
int GetBlockCount ()
 
int GetVoteCount ()
 
bool IsEnoughData ()
 
int GetStorageLimit ()
 
void UpdatedBlockTip (const CBlockIndex *pindex, CConnman &connman)
 

Public Attributes

std::map< uint256, CMasternodePaymentVotemapMasternodePaymentVotes
 
std::map< int, CMasternodeBlockPayeesmapMasternodeBlocks
 
std::map< COutPoint, int > mapMasternodesLastVote
 
std::map< COutPoint, int > mapMasternodesDidNotVote
 
 ADD_SERIALIZE_METHODS
 

Private Attributes

const float nStorageCoeff
 
const int nMinBlocksToStore
 
int nCachedBlockHeight
 

Detailed Description

Definition at line 167 of file masternode-payments.h.

Constructor & Destructor Documentation

◆ CMasternodePayments()

CMasternodePayments::CMasternodePayments ( )
inline

Definition at line 184 of file masternode-payments.h.

Member Function Documentation

◆ AddPaymentVote()

bool CMasternodePayments::AddPaymentVote ( const CMasternodePaymentVote vote)

Definition at line 467 of file masternode-payments.cpp.

Referenced by ProcessBlock(), and ProcessMessage().

◆ CanVote()

bool CMasternodePayments::CanVote ( COutPoint  outMasternode,
int  nBlockHeight 
)

Definition at line 245 of file masternode-payments.cpp.

Referenced by ProcessMessage().

◆ CheckAndRemove()

void CMasternodePayments::CheckAndRemove ( )

Definition at line 632 of file masternode-payments.cpp.

Referenced by ThreadCheckPrivateSend().

◆ CheckPreviousBlockVotes()

void CMasternodePayments::CheckPreviousBlockVotes ( int  nPrevBlockHeight)

Definition at line 780 of file masternode-payments.cpp.

Referenced by UpdatedBlockTip().

◆ Clear()

void CMasternodePayments::Clear ( )

Definition at line 238 of file masternode-payments.cpp.

◆ FillBlockPayee()

void CMasternodePayments::FillBlockPayee ( CMutableTransaction txNew,
int  nBlockHeight,
CAmount  blockReward,
CTxOut txoutMasternodeRet 
)

FillBlockPayee

Fill Masternode ONLY payment block

Definition at line 264 of file masternode-payments.cpp.

Referenced by FillBlockPayments().

◆ GetBlockCount()

int CMasternodePayments::GetBlockCount ( )
inline

Definition at line 217 of file masternode-payments.h.

Referenced by IsEnoughData().

◆ GetBlockPayee()

bool CMasternodePayments::GetBlockPayee ( int  nBlockHeight,
CScript payee 
)

Definition at line 436 of file masternode-payments.cpp.

Referenced by ComputeBlockVersion(), and FillBlockPayee().

◆ GetMinMasternodePaymentsProto()

◆ GetRequiredPaymentsString()

std::string CMasternodePayments::GetRequiredPaymentsString ( int  nBlockHeight)

Definition at line 610 of file masternode-payments.cpp.

Referenced by GetRequiredPaymentsString().

◆ GetStorageLimit()

◆ GetVoteCount()

int CMasternodePayments::GetVoteCount ( )
inline

Definition at line 218 of file masternode-payments.h.

Referenced by IsEnoughData().

◆ HasVerifiedPaymentVote()

bool CMasternodePayments::HasVerifiedPaymentVote ( uint256  hashIn)

Definition at line 488 of file masternode-payments.cpp.

Referenced by AddPaymentVote(), ProcessGetData(), and Sync().

◆ IsEnoughData()

bool CMasternodePayments::IsEnoughData ( )

Definition at line 1002 of file masternode-payments.cpp.

Referenced by CMasternodeSync::ProcessTick().

◆ IsScheduled()

bool CMasternodePayments::IsScheduled ( CMasternode mn,
int  nNotBlockHeight 
)

◆ IsTransactionValid()

bool CMasternodePayments::IsTransactionValid ( const CTransaction txNew,
int  nBlockHeight 
)

Definition at line 621 of file masternode-payments.cpp.

Referenced by IsBlockPayeeValid().

◆ ProcessBlock()

bool CMasternodePayments::ProcessBlock ( int  nBlockHeight,
CConnman connman 
)

Definition at line 715 of file masternode-payments.cpp.

Referenced by UpdatedBlockTip().

◆ ProcessMessage()

void CMasternodePayments::ProcessMessage ( CNode pfrom,
std::string &  strCommand,
CDataStream vRecv,
CConnman connman 
)

Definition at line 306 of file masternode-payments.cpp.

Referenced by ProcessMessage().

◆ RequestLowDataPaymentBlocks()

void CMasternodePayments::RequestLowDataPaymentBlocks ( CNode pnode,
CConnman connman 
)

Definition at line 913 of file masternode-payments.cpp.

Referenced by CMasternodeSync::ProcessTick().

◆ SerializationOp()

template<typename Stream , typename Operation >
void CMasternodePayments::SerializationOp ( Stream &  s,
Operation  ser_action,
int  nType,
int  nVersion 
)
inline

Definition at line 189 of file masternode-payments.h.

◆ Sync()

void CMasternodePayments::Sync ( CNode node,
CConnman connman 
)

Definition at line 887 of file masternode-payments.cpp.

Referenced by ProcessMessage().

◆ ToString()

std::string CMasternodePayments::ToString ( ) const

Definition at line 992 of file masternode-payments.cpp.

Referenced by CheckAndRemove().

◆ UpdatedBlockTip()

void CMasternodePayments::UpdatedBlockTip ( const CBlockIndex pindex,
CConnman connman 
)

Definition at line 1014 of file masternode-payments.cpp.

Referenced by CDSNotificationInterface::UpdatedBlockTip().

Member Data Documentation

◆ ADD_SERIALIZE_METHODS

CMasternodePayments::ADD_SERIALIZE_METHODS

Definition at line 186 of file masternode-payments.h.

◆ mapMasternodeBlocks

◆ mapMasternodePaymentVotes

◆ mapMasternodesDidNotVote

std::map<COutPoint, int> CMasternodePayments::mapMasternodesDidNotVote

Definition at line 182 of file masternode-payments.h.

Referenced by CheckPreviousBlockVotes().

◆ mapMasternodesLastVote

std::map<COutPoint, int> CMasternodePayments::mapMasternodesLastVote

Definition at line 181 of file masternode-payments.h.

Referenced by CanVote().

◆ nCachedBlockHeight

int CMasternodePayments::nCachedBlockHeight
private

◆ nMinBlocksToStore

const int CMasternodePayments::nMinBlocksToStore
private

Definition at line 173 of file masternode-payments.h.

Referenced by GetStorageLimit().

◆ nStorageCoeff

const float CMasternodePayments::nStorageCoeff
private

Definition at line 171 of file masternode-payments.h.

Referenced by GetStorageLimit().


The documentation for this class was generated from the following files: