Do not calculate MN payments during initial download

This commit is contained in:
UdjinM6 2015-05-02 19:55:31 +03:00
parent 854a1be027
commit 905b28f813

View File

@ -2942,12 +2942,12 @@ bool CheckBlock(const CBlock& block, CValidationState& state, bool fCheckPOW, bo
CBlockIndex *pindex = chainActive.Tip();
if(pindex != NULL){
if(pindex->GetBlockHash() == block.hashPrevBlock){
int64_t masternodePaymentAmount = GetMasternodePayment(pindex->nHeight+1, block.vtx[0].GetValueOut());
bool fIsInitialDownload = IsInitialBlockDownload();
// If we don't already have its previous block, skip masternode payment step
if (!fIsInitialDownload && pindex != NULL)
if (!fIsInitialDownload)
{
int64_t masternodePaymentAmount = GetMasternodePayment(pindex->nHeight+1, block.vtx[0].GetValueOut());
bool foundPaymentAmount = false;
bool foundPayee = false;
bool foundPaymentAndPayee = false;