PRCYCoin  2.0.0.7rc1
P2P Digital Currency
Public Member Functions | Public Attributes | Private Attributes | List of all members
CMasternodePayments Class Reference

#include <masternode-payments.h>

Public Member Functions

 CMasternodePayments ()
 
void Clear ()
 
bool AddWinningMasternode (CMasternodePaymentWinner &winner)
 
bool ProcessBlock (int nBlockHeight)
 
void Sync (CNode *node, int nCountNeeded)
 
void CleanPaymentList ()
 
int LastPayment (CMasternode &mn)
 
bool GetBlockPayee (int nBlockHeight, std::vector< unsigned char > &payee)
 
bool IsTransactionValid (const CTransaction &txNew, int nBlockHeight)
 
bool IsScheduled (CMasternode &mn, int nNotBlockHeight)
 
bool CanVote (COutPoint outMasternode, int nBlockHeight)
 
int GetMinMasternodePaymentsProto ()
 
void ProcessMessageMasternodePayments (CNode *pfrom, std::string &strCommand, CDataStream &vRecv)
 
std::string GetRequiredPaymentsString (int nBlockHeight)
 
bool FillBlockPayee (CMutableTransaction &txNew, int64_t nFees, bool fProofOfStake)
 
std::string ToString () const
 
int GetOldestBlock ()
 
int GetNewestBlock ()
 
template<typename Stream , typename Operation >
void SerializationOp (Stream &s, Operation ser_action, int nType, int nVersion)
 

Public Attributes

std::map< uint256, CMasternodePaymentWinnermapMasternodePayeeVotes
 
std::map< int, CMasternodeBlockPayeesmapMasternodeBlocks
 
std::map< uint256, int > mapMasternodesLastVote
 
 ADD_SERIALIZE_METHODS
 

Private Attributes

int nSyncedFromPeer
 
int nLastBlockHeight
 

Detailed Description

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

Constructor & Destructor Documentation

◆ CMasternodePayments()

CMasternodePayments::CMasternodePayments ( )
inline

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

Member Function Documentation

◆ AddWinningMasternode()

bool CMasternodePayments::AddWinningMasternode ( CMasternodePaymentWinner winner)

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

Here is the call graph for this function:
Here is the caller graph for this function:

◆ CanVote()

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

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

Here is the caller graph for this function:

◆ CleanPaymentList()

void CMasternodePayments::CleanPaymentList ( )

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

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Clear()

void CMasternodePayments::Clear ( )
inline

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

◆ FillBlockPayee()

bool CMasternodePayments::FillBlockPayee ( CMutableTransaction txNew,
int64_t  nFees,
bool  fProofOfStake 
)

For Proof Of Stake vout[0] must be null Stake reward can be split into many different outputs, so we must use vout.size() to align with several different cases. An additional output is appended as the masternode payment

Topdev update

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

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetBlockPayee()

bool CMasternodePayments::GetBlockPayee ( int  nBlockHeight,
std::vector< unsigned char > &  payee 
)

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

Here is the caller graph for this function:

◆ GetMinMasternodePaymentsProto()

int CMasternodePayments::GetMinMasternodePaymentsProto ( )

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

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetNewestBlock()

int CMasternodePayments::GetNewestBlock ( )

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

◆ GetOldestBlock()

int CMasternodePayments::GetOldestBlock ( )

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

◆ GetRequiredPaymentsString()

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

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

Here is the caller graph for this function:

◆ IsScheduled()

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

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

Here is the call graph for this function:
Here is the caller graph for this function:

◆ IsTransactionValid()

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

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

Here is the caller graph for this function:

◆ LastPayment()

int CMasternodePayments::LastPayment ( CMasternode mn)

◆ ProcessBlock()

bool CMasternodePayments::ProcessBlock ( int  nBlockHeight)

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

Here is the call graph for this function:

◆ ProcessMessageMasternodePayments()

void CMasternodePayments::ProcessMessageMasternodePayments ( CNode pfrom,
std::string &  strCommand,
CDataStream vRecv 
)

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

Here is the call graph for this function:

◆ SerializationOp()

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

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

◆ Sync()

void CMasternodePayments::Sync ( CNode node,
int  nCountNeeded 
)

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

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ToString()

std::string CMasternodePayments::ToString ( ) const

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

Member Data Documentation

◆ ADD_SERIALIZE_METHODS

CMasternodePayments::ADD_SERIALIZE_METHODS

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

◆ mapMasternodeBlocks

std::map<int, CMasternodeBlockPayees> CMasternodePayments::mapMasternodeBlocks

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

◆ mapMasternodePayeeVotes

std::map<uint256, CMasternodePaymentWinner> CMasternodePayments::mapMasternodePayeeVotes

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

◆ mapMasternodesLastVote

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

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

◆ nLastBlockHeight

int CMasternodePayments::nLastBlockHeight
private

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

◆ nSyncedFromPeer

int CMasternodePayments::nSyncedFromPeer
private

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


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