Dash Core Source Documentation (0.16.0.1)

Find detailed information regarding the Dash Core source code.

masternode-payments.cpp File Reference
#include <masternode/activemasternode.h>
#include <consensus/validation.h>
#include <governance/governance-classes.h>
#include <init.h>
#include <masternode/masternode-payments.h>
#include <masternode/masternode-sync.h>
#include <messagesigner.h>
#include <netfulfilledman.h>
#include <netmessagemaker.h>
#include <spork.h>
#include <util.h>
#include <validation.h>
#include <evo/deterministicmns.h>
#include <string>
+ Include dependency graph for masternode-payments.cpp:

Go to the source code of this file.

Functions

bool IsOldBudgetBlockValueValid (const CBlock &block, int nBlockHeight, CAmount blockReward, std::string &strErrorRet)
 
bool IsBlockValueValid (const CBlock &block, int nBlockHeight, CAmount blockReward, std::string &strErrorRet)
 IsBlockValueValid. More...
 
bool IsBlockPayeeValid (const CTransaction &txNew, int nBlockHeight, CAmount blockReward)
 
void FillBlockPayments (CMutableTransaction &txNew, int nBlockHeight, CAmount blockReward, std::vector< CTxOut > &voutMasternodePaymentsRet, std::vector< CTxOut > &voutSuperblockPaymentsRet)
 
std::string GetRequiredPaymentsString (int nBlockHeight, const CDeterministicMNCPtr &payee)
 
std::map< int, std::string > GetRequiredPaymentsStrings (int nStartHeight, int nEndHeight)
 

Variables

CMasternodePayments mnpayments
 

Function Documentation

◆ FillBlockPayments()

◆ GetRequiredPaymentsString()

std::string GetRequiredPaymentsString ( int  nBlockHeight,
const CDeterministicMNCPtr payee 
)

◆ GetRequiredPaymentsStrings()

std::map<int, std::string> GetRequiredPaymentsStrings ( int  nStartHeight,
int  nEndHeight 
)

◆ IsBlockPayeeValid()

◆ IsBlockValueValid()

bool IsBlockValueValid ( const CBlock block,
int  nBlockHeight,
CAmount  blockReward,
std::string &  strErrorRet 
)

IsBlockValueValid.

TODO: all 4 functions do not belong here really, they should be refactored/moved somewhere (main.cpp ?)

Determine if coinbase outgoing created money is the correct value

Why is this needed?

  • In Dash some blocks are superblocks, which output much higher amounts of coins
  • Otherblocks are 10% lower in outgoing value, so in total, no extra coins are created
  • When non-superblocks are detected, the normal schedule should be maintained

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

References fDisableGovernance, CChainParams::GetConsensus(), CSuperblock::GetPaymentsLimit(), BCLog::GOBJECT, IsOldBudgetBlockValueValid(), CSporkManager::IsSporkActive(), CSuperblockManager::IsSuperblockTriggered(), CMasternodeSync::IsSynced(), CSuperblockManager::IsValid(), CSuperblock::IsValidBlockHeight(), LogPrint, LogPrintf, masternodeSync, BCLog::MNPAYMENTS, Consensus::Params::nBudgetPaymentsStartBlock, Consensus::Params::nSuperblockStartBlock, Params(), SPORK_9_SUPERBLOCKS_ENABLED, sporkManager, strprintf, and CBlock::vtx.

Referenced by CChainState::ConnectBlock().

◆ IsOldBudgetBlockValueValid()

Variable Documentation

◆ mnpayments

CMasternodePayments mnpayments

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

Referenced by FillBlockPayments(), getblocktemplate(), and IsBlockPayeeValid().

Released under the MIT license