5 #ifndef MASTERNODE_PAYMENTS_H 6 #define MASTERNODE_PAYMENTS_H 62 template <
typename Stream,
typename Operation>
63 inline void SerializationOp(Stream& s, Operation ser_action,
int nType,
int nVersion) {
93 template <
typename Stream,
typename Operation>
94 inline void SerializationOp(Stream& s, Operation ser_action,
int nType,
int nVersion) {
134 template <
typename Stream,
typename Operation>
135 inline void SerializationOp(Stream& s, Operation ser_action,
int nType,
int nVersion) {
188 template <
typename Stream,
typename Operation>
189 inline void SerializationOp(Stream& s, Operation ser_action,
int nType,
int nVersion) {
bool AddPaymentVote(const CMasternodePaymentVote &vote)
void FillBlockPayee(CMutableTransaction &txNew, int nBlockHeight, CAmount blockReward, CTxOut &txoutMasternodeRet)
std::string ToString() const
CMasternodePaymentVote(COutPoint outpointMasternode, int nBlockHeight, CScript payee)
CMasternodePayee(CScript payee, uint256 hashIn)
bool GetBestPayee(CScript &payeeRet)
std::string ToString() const
bool CheckSignature(const CPubKey &pubKeyMasternode, int nValidationHeight, int &nDos)
CCriticalSection cs_vecPayees
void SerializationOp(Stream &s, Operation ser_action, int nType, int nVersion)
void ProcessMessage(CNode *pfrom, std::string &strCommand, CDataStream &vRecv, CConnman &connman)
const int nMinBlocksToStore
static const int MNPAYMENTS_SIGNATURES_REQUIRED
void RequestLowDataPaymentBlocks(CNode *pnode, CConnman &connman)
bool IsValid(CNode *pnode, int nValidationHeight, std::string &strError, CConnman &connman)
void CheckPreviousBlockVotes(int nPrevBlockHeight)
void AddVoteHash(uint256 hashIn)
void UpdatedBlockTip(const CBlockIndex *pindex, CConnman &connman)
std::string GetRequiredPaymentsString(int nBlockHeight)
bool IsBlockPayeeValid(const CTransaction &txNew, int nBlockHeight, CAmount blockReward)
static const int MNPAYMENTS_SIGNATURES_TOTAL
std::vector< CMasternodePayee > vecPayees
std::map< COutPoint, int > mapMasternodesLastVote
void SerializationOp(Stream &s, Operation ser_action, int nType, int nVersion)
std::vector< uint256 > GetVoteHashes()
bool IsScheduled(CMasternode &mn, int nNotBlockHeight)
bool IsTransactionValid(const CTransaction &txNew)
bool IsTransactionValid(const CTransaction &txNew, int nBlockHeight)
CMasternodePayments mnpayments
CMasternodeBlockPayees(int nBlockHeightIn)
std::string GetRequiredPaymentsString(int nBlockHeight)
static const int MIN_MASTERNODE_PAYMENT_PROTO_VERSION_1
minimum peer version that can receive and send masternode payment messages,
CCriticalSection cs_mapMasternodeBlocks
void FillBlockPayments(CMutableTransaction &txNew, int nBlockHeight, CAmount blockReward, CTxOut &txoutMasternodeRet, std::vector< CTxOut > &voutSuperblockRet)
static const int MIN_MASTERNODE_PAYMENT_PROTO_VERSION_2
const float nStorageCoeff
std::vector< unsigned char > vchSig
void SerializationOp(Stream &s, Operation ser_action, int nType, int nVersion)
bool HasPayeeWithVotes(const CScript &payeeIn, int nVotesReq)
bool ProcessBlock(int nBlockHeight, CConnman &connman)
std::string GetRequiredPaymentsString()
static const int PROTOCOL_VERSION
void SerializationOp(Stream &s, Operation ser_action, int nType, int nVersion)
bool IsBlockValueValid(const CBlock &block, int nBlockHeight, CAmount blockReward, std::string &strErrorRet)
TODO: all 4 functions do not belong here really, they should be refactored/moved somewhere (main...
CCriticalSection cs_mapMasternodePayeeVotes
std::map< COutPoint, int > mapMasternodesDidNotVote
int GetMinMasternodePaymentsProto()
void Sync(CNode *node, CConnman &connman)
std::map< uint256, CMasternodePaymentVote > mapMasternodePaymentVotes
void Relay(CConnman &connman)
std::vector< uint256 > vecVoteHashes
bool CanVote(COutPoint outMasternode, int nBlockHeight)
bool GetBlockPayee(int nBlockHeight, CScript &payee)
std::map< int, CMasternodeBlockPayees > mapMasternodeBlocks
void AddPayee(const CMasternodePaymentVote &vote)
bool HasVerifiedPaymentVote(uint256 hashIn)