From 905b28f813056f1775a005d4400bc0cc50b69bdb Mon Sep 17 00:00:00 2001 From: UdjinM6 Date: Sat, 2 May 2015 19:55:31 +0300 Subject: [PATCH] Do not calculate MN payments during initial download --- src/main.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index 2c3d860e9..c07bd1df4 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -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;