From 587911b36f9a9104c3ab75f9a70a0165de55c497 Mon Sep 17 00:00:00 2001 From: UdjinM6 Date: Fri, 21 Dec 2018 18:21:28 +0300 Subject: [PATCH] Fix IsBlockPayeeValid (#2577) - should skip while not synced regardless of spork15 state - add missing logprintf --- src/masternode-payments.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/masternode-payments.cpp b/src/masternode-payments.cpp index 61da6eaeb..b3b00e027 100644 --- a/src/masternode-payments.cpp +++ b/src/masternode-payments.cpp @@ -167,7 +167,7 @@ bool IsBlockValueValid(const CBlock& block, int nBlockHeight, CAmount blockRewar bool IsBlockPayeeValid(const CTransaction& txNew, int nBlockHeight, CAmount blockReward) { - if((!masternodeSync.IsSynced() && !deterministicMNManager->IsDeterministicMNsSporkActive(nBlockHeight)) || fLiteMode) { + if(!masternodeSync.IsSynced() || fLiteMode) { //there is no budget data to use to check anything, let's just accept the longest chain if(fDebug) LogPrintf("%s -- WARNING: Not enough data, skipping block payee checks\n", __func__); return true; @@ -218,6 +218,7 @@ bool IsBlockPayeeValid(const CTransaction& txNew, int nBlockHeight, CAmount bloc if (deterministicMNManager->IsDeterministicMNsSporkActive(nBlockHeight)) { // always enforce masternode payments when spork15 is active + LogPrintf("%s -- ERROR: Invalid masternode payment detected at height %d: %s", __func__, nBlockHeight, txNew.ToString()); return false; } else { if(sporkManager.IsSporkActive(SPORK_8_MASTERNODE_PAYMENT_ENFORCEMENT)) {