![]() |
Dash Core
0.12.2.1
P2P Digital Currency
|
#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, CMasternodePaymentVote > | mapMasternodePaymentVotes |
std::map< int, CMasternodeBlockPayees > | mapMasternodeBlocks |
std::map< COutPoint, int > | mapMasternodesLastVote |
std::map< COutPoint, int > | mapMasternodesDidNotVote |
ADD_SERIALIZE_METHODS | |
Private Attributes | |
const float | nStorageCoeff |
const int | nMinBlocksToStore |
int | nCachedBlockHeight |
Definition at line 167 of file masternode-payments.h.
|
inline |
Definition at line 184 of file masternode-payments.h.
bool CMasternodePayments::AddPaymentVote | ( | const CMasternodePaymentVote & | vote | ) |
Definition at line 467 of file masternode-payments.cpp.
Referenced by ProcessBlock(), and ProcessMessage().
bool CMasternodePayments::CanVote | ( | COutPoint | outMasternode, |
int | nBlockHeight | ||
) |
Definition at line 245 of file masternode-payments.cpp.
Referenced by ProcessMessage().
void CMasternodePayments::CheckAndRemove | ( | ) |
Definition at line 632 of file masternode-payments.cpp.
Referenced by ThreadCheckPrivateSend().
void CMasternodePayments::CheckPreviousBlockVotes | ( | int | nPrevBlockHeight | ) |
Definition at line 780 of file masternode-payments.cpp.
Referenced by UpdatedBlockTip().
void CMasternodePayments::Clear | ( | ) |
Definition at line 238 of file masternode-payments.cpp.
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().
|
inline |
Definition at line 217 of file masternode-payments.h.
Referenced by IsEnoughData().
bool CMasternodePayments::GetBlockPayee | ( | int | nBlockHeight, |
CScript & | payee | ||
) |
Definition at line 436 of file masternode-payments.cpp.
Referenced by ComputeBlockVersion(), and FillBlockPayee().
int CMasternodePayments::GetMinMasternodePaymentsProto | ( | ) |
Definition at line 300 of file masternode-payments.cpp.
Referenced by CMasternode::Check(), CheckPreviousBlockVotes(), CMasternodeMan::CountEnabled(), CMasternodeMan::CountMasternodes(), CMasternodeMan::FindRandomNotInVec(), CMasternodeMan::GetNextMasternodeInQueueForPayment(), CMasternodePaymentVote::IsValid(), ProcessBlock(), ProcessMessage(), CMasternodeSync::ProcessTick(), CMasternodePaymentVote::Relay(), and CMasternodeBroadcast::SimpleCheck().
std::string CMasternodePayments::GetRequiredPaymentsString | ( | int | nBlockHeight | ) |
Definition at line 610 of file masternode-payments.cpp.
Referenced by GetRequiredPaymentsString().
int CMasternodePayments::GetStorageLimit | ( | ) |
Definition at line 1009 of file masternode-payments.cpp.
Referenced by CheckAndRemove(), IsEnoughData(), ProcessMessage(), CMasternodeSync::ProcessTick(), RequestLowDataPaymentBlocks(), and CMasternodeMan::UpdateLastPaid().
|
inline |
Definition at line 218 of file masternode-payments.h.
Referenced by IsEnoughData().
bool CMasternodePayments::HasVerifiedPaymentVote | ( | uint256 | hashIn | ) |
Definition at line 488 of file masternode-payments.cpp.
Referenced by AddPaymentVote(), ProcessGetData(), and Sync().
bool CMasternodePayments::IsEnoughData | ( | ) |
Definition at line 1002 of file masternode-payments.cpp.
Referenced by CMasternodeSync::ProcessTick().
bool CMasternodePayments::IsScheduled | ( | CMasternode & | mn, |
int | nNotBlockHeight | ||
) |
Definition at line 447 of file masternode-payments.cpp.
Referenced by CMasternodeMan::GetNextMasternodeInQueueForPayment().
bool CMasternodePayments::IsTransactionValid | ( | const CTransaction & | txNew, |
int | nBlockHeight | ||
) |
Definition at line 621 of file masternode-payments.cpp.
Referenced by IsBlockPayeeValid().
bool CMasternodePayments::ProcessBlock | ( | int | nBlockHeight, |
CConnman & | connman | ||
) |
Definition at line 715 of file masternode-payments.cpp.
Referenced by UpdatedBlockTip().
void CMasternodePayments::ProcessMessage | ( | CNode * | pfrom, |
std::string & | strCommand, | ||
CDataStream & | vRecv, | ||
CConnman & | connman | ||
) |
Definition at line 306 of file masternode-payments.cpp.
Referenced by ProcessMessage().
Definition at line 913 of file masternode-payments.cpp.
Referenced by CMasternodeSync::ProcessTick().
|
inline |
Definition at line 189 of file masternode-payments.h.
Definition at line 887 of file masternode-payments.cpp.
Referenced by ProcessMessage().
std::string CMasternodePayments::ToString | ( | ) | const |
Definition at line 992 of file masternode-payments.cpp.
Referenced by CheckAndRemove().
void CMasternodePayments::UpdatedBlockTip | ( | const CBlockIndex * | pindex, |
CConnman & | connman | ||
) |
Definition at line 1014 of file masternode-payments.cpp.
Referenced by CDSNotificationInterface::UpdatedBlockTip().
CMasternodePayments::ADD_SERIALIZE_METHODS |
Definition at line 186 of file masternode-payments.h.
std::map<int, CMasternodeBlockPayees> CMasternodePayments::mapMasternodeBlocks |
Definition at line 180 of file masternode-payments.h.
Referenced by AddPaymentVote(), AlreadyHave(), CheckAndRemove(), CheckPreviousBlockVotes(), Clear(), GetBlockCount(), GetBlockPayee(), GetRequiredPaymentsString(), IsScheduled(), IsTransactionValid(), ProcessGetData(), RequestLowDataPaymentBlocks(), SerializationOp(), Sync(), ToString(), and CMasternode::UpdateLastPaid().
std::map<uint256, CMasternodePaymentVote> CMasternodePayments::mapMasternodePaymentVotes |
Definition at line 179 of file masternode-payments.h.
Referenced by AddPaymentVote(), AlreadyHave(), CheckAndRemove(), CheckPreviousBlockVotes(), Clear(), GetVoteCount(), HasVerifiedPaymentVote(), ProcessGetData(), ProcessMessage(), SerializationOp(), and ToString().
std::map<COutPoint, int> CMasternodePayments::mapMasternodesDidNotVote |
Definition at line 182 of file masternode-payments.h.
Referenced by CheckPreviousBlockVotes().
std::map<COutPoint, int> CMasternodePayments::mapMasternodesLastVote |
Definition at line 181 of file masternode-payments.h.
Referenced by CanVote().
|
private |
Definition at line 176 of file masternode-payments.h.
Referenced by CheckAndRemove(), IsScheduled(), ProcessMessage(), RequestLowDataPaymentBlocks(), Sync(), and UpdatedBlockTip().
|
private |
Definition at line 173 of file masternode-payments.h.
Referenced by GetStorageLimit().
|
private |
Definition at line 171 of file masternode-payments.h.
Referenced by GetStorageLimit().