Dash Core Source Documentation (0.16.0.1)
Find detailed information regarding the Dash Core source code.
#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()
| 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().
◆ GetRequiredPaymentsString()
| std::string GetRequiredPaymentsString | ( | int | nBlockHeight, |
| const CDeterministicMNCPtr & | payee | ||
| ) |
Definition at line 244 of file masternode-payments.cpp.
References EncodeDestination(), ExtractDestination(), CSuperblockManager::GetRequiredPaymentsString(), and CSuperblockManager::IsSuperblockTriggered().
Referenced by GetRequiredPaymentsStrings().
◆ 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 | ||
| ) |
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()
| bool IsOldBudgetBlockValueValid | ( | const CBlock & | block, |
| int | nBlockHeight, | ||
| CAmount | blockReward, | ||
| std::string & | strErrorRet | ||
| ) |
Definition at line 24 of file masternode-payments.cpp.
References CChainParams::GetConsensus(), BCLog::GOBJECT, CMasternodeSync::IsSynced(), LogPrint, masternodeSync, Consensus::Params::nBudgetPaymentsCycleBlocks, Consensus::Params::nBudgetPaymentsStartBlock, Consensus::Params::nBudgetPaymentsWindowBlocks, Consensus::Params::nSuperblockStartBlock, Params(), strprintf, and CBlock::vtx.
Referenced by IsBlockValueValid().
Variable Documentation
◆ mnpayments
| CMasternodePayments mnpayments |
Definition at line 22 of file masternode-payments.cpp.
Referenced by FillBlockPayments(), getblocktemplate(), and IsBlockPayeeValid().

