diff --git a/src/main.cpp b/src/main.cpp index f4e61aff6..73f146367 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -2773,11 +2773,13 @@ bool ConnectBlock(const CBlock& block, CValidationState& state, CBlockIndex* pin // DASH : MODIFYED TO CHECK MASTERNODE PAYMENTS AND SUPERBLOCKS CAmount blockReward = nFees + GetBlockSubsidy(pindex->pprev->nBits, pindex->pprev->nHeight, chainparams.GetConsensus()); - if (!IsBlockValueValid(block, pindex->nHeight, blockReward)) + if (!IsBlockValueValid(block, pindex->nHeight, blockReward)) { + LogPrintf("ConnectBlock() -- IsBlockValueValid returned false, nHeight = %d\n", pindex->nHeight); // TODO: handle error here more accurate - this could actually fail for different reasons return state.DoS(100, error("ConnectBlock(): coinbase pays too much (actual=%d vs limit=%d)", block.vtx[0].GetValueOut(), blockReward), REJECT_INVALID, "bad-cb-amount"); + } if (!IsBlockPayeeValid(block.vtx[0], pindex->nHeight, blockReward)) { mapRejectedBlocks.insert(make_pair(block.GetHash(), GetTime()));