Dash Core  0.12.2.1
P2P Digital Currency
masternode-payments.cpp File Reference
#include "activemasternode.h"
#include "governance-classes.h"
#include "masternode-payments.h"
#include "masternode-sync.h"
#include "masternodeman.h"
#include "messagesigner.h"
#include "netfulfilledman.h"
#include "spork.h"
#include "util.h"
#include <boost/lexical_cast.hpp>

Go to the source code of this file.

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, CTxOut &txoutMasternodeRet, std::vector< CTxOut > &voutSuperblockRet)
 
std::string GetRequiredPaymentsString (int nBlockHeight)
 

Variables

CMasternodePayments mnpayments
 
CCriticalSection cs_vecPayees
 
CCriticalSection cs_mapMasternodeBlocks
 
CCriticalSection cs_mapMasternodePaymentVotes
 

Function Documentation

◆ FillBlockPayments()

void FillBlockPayments ( CMutableTransaction txNew,
int  nBlockHeight,
CAmount  blockReward,
CTxOut txoutMasternodeRet,
std::vector< CTxOut > &  voutSuperblockRet 
)

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

Referenced by CreateNewBlock().

◆ GetRequiredPaymentsString()

std::string GetRequiredPaymentsString ( int  nBlockHeight)

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

Referenced by masternode().

◆ IsBlockPayeeValid()

bool IsBlockPayeeValid ( const CTransaction txNew,
int  nBlockHeight,
CAmount  blockReward 
)

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

Referenced by 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 ?)

IsBlockValueValid

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 35 of file masternode-payments.cpp.

Referenced by ConnectBlock().

Variable Documentation

◆ cs_mapMasternodeBlocks

◆ cs_mapMasternodePaymentVotes

◆ cs_vecPayees

◆ mnpayments