From e82e5339f9ccd60085df3c491064c7079687b869 Mon Sep 17 00:00:00 2001 From: Evan Duffield Date: Sat, 18 Jul 2015 12:52:12 -0700 Subject: [PATCH] Better NewBlock sync check --- src/main.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index 5aaf677c9..51a195eaa 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -3261,8 +3261,8 @@ bool ProcessNewBlock(CValidationState &state, CNode* pfrom, CBlock* pblock, CDis return error("%s : ActivateBestChain failed", __func__); if(!fLiteMode){ - if (!fImporting && !fReindex && chainActive.Height() > Checkpoints::GetTotalBlocksEstimate()){ - if(fMasternode || activeMasternode.status == ACTIVE_MASTERNODE_STARTED) coinbasePayee.BuildIndex(true); + if (masternodeSync.IsSynced()){ + if(fMasterNode || activeMasternode.status == ACTIVE_MASTERNODE_STARTED) coinbasePayee.BuildIndex(true); darkSendPool.NewBlock(); masternodePayments.ProcessBlock(GetHeight()+10); budget.NewBlock();