Dash Core Source Documentation (0.16.0.1)
Find detailed information regarding the Dash Core source code.
#include <util.h>
#include <core_io.h>
#include <key.h>
#include <net_processing.h>
#include <utilstrencodings.h>
#include <evo/deterministicmns.h>
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()
void FillBlockPayments | ( | CMutableTransaction & | txNew, |
int | nBlockHeight, | ||
CAmount | blockReward, | ||
std::vector< CTxOut > & | voutMasternodePaymentsRet, | ||
std::vector< CTxOut > & | voutSuperblockPaymentsRet | ||
) |
Definition at line 214 of file masternode-payments.cpp.
References CMasternodePayments::GetMasternodeTxOuts(), CSuperblockManager::GetSuperblockPayments(), BCLog::GOBJECT, CSporkManager::IsSporkActive(), CSuperblockManager::IsSuperblockTriggered(), LogPrint, mnpayments, BCLog::MNPAYMENTS, SPORK_9_SUPERBLOCKS_ENABLED, sporkManager, CMutableTransaction::ToString(), and CMutableTransaction::vout.
Referenced by BlockAssembler::CreateNewBlock().
◆ GetRequiredPaymentsStrings()
std::map<int, std::string> GetRequiredPaymentsStrings | ( | int | nStartHeight, |
int | nEndHeight | ||
) |
Definition at line 259 of file masternode-payments.cpp.
References chainActive, cs_main, deterministicMNManager, GetRequiredPaymentsString(), CChain::Height(), and LOCK.
Referenced by masternode_winners().
◆ IsBlockPayeeValid()
bool IsBlockPayeeValid | ( | const CTransaction & | txNew, |
int | nBlockHeight, | ||
CAmount | blockReward | ||
) |
Definition at line 162 of file masternode-payments.cpp.
References fDisableGovernance, CChainParams::GetConsensus(), BCLog::GOBJECT, CSporkManager::IsSporkActive(), CSuperblockManager::IsSuperblockTriggered(), CMasternodePayments::IsTransactionValid(), CSuperblockManager::IsValid(), LogPrint, LogPrintf, mnpayments, BCLog::MNPAYMENTS, Consensus::Params::nSuperblockStartBlock, Params(), SPORK_9_SUPERBLOCKS_ENABLED, sporkManager, and CTransaction::ToString().
Referenced by CChainState::ConnectBlock().
◆ 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().