Dash Core Source Documentation (0.16.0.1)

Find detailed information regarding the Dash Core source code.

masternode-payments.h File Reference
#include <util.h>
#include <core_io.h>
#include <key.h>
#include <net_processing.h>
#include <utilstrencodings.h>
#include <evo/deterministicmns.h>
+ Include dependency graph for masternode-payments.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  CMasternodePayments
 

Functions

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.cpp ?) 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::map< int, std::string > GetRequiredPaymentsStrings (int nStartHeight, int nEndHeight)
 

Variables

CMasternodePayments mnpayments
 

Function Documentation

◆ FillBlockPayments()

◆ 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 
)

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

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().

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