mirror of
https://github.com/dashpay/dash.git
synced 2024-12-27 04:52:59 +01:00
IsBlockchainSynced should not proceed until we are past the latest checkpoint (#1070)
This commit is contained in:
parent
9071933bf4
commit
2feb321c2e
@ -3,6 +3,7 @@
|
|||||||
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||||
|
|
||||||
#include "activemasternode.h"
|
#include "activemasternode.h"
|
||||||
|
#include "checkpoints.h"
|
||||||
#include "governance.h"
|
#include "governance.h"
|
||||||
#include "main.h"
|
#include "main.h"
|
||||||
#include "masternode.h"
|
#include "masternode.h"
|
||||||
@ -30,6 +31,8 @@ bool CMasternodeSync::IsBlockchainSynced()
|
|||||||
|
|
||||||
if(fBlockchainSynced) return true;
|
if(fBlockchainSynced) return true;
|
||||||
if(!pCurrentBlockIndex || !pindexBestHeader || fImporting || fReindex) return false;
|
if(!pCurrentBlockIndex || !pindexBestHeader || fImporting || fReindex) return false;
|
||||||
|
if(fCheckpointsEnabled && pCurrentBlockIndex->nHeight < Checkpoints::GetTotalBlocksEstimate(Params().Checkpoints()))
|
||||||
|
return false;
|
||||||
|
|
||||||
// same as !IsInitialBlockDownload() but no cs_main needed here
|
// same as !IsInitialBlockDownload() but no cs_main needed here
|
||||||
int nMaxBlockTime = std::max(pCurrentBlockIndex->GetBlockTime(), pindexBestHeader->GetBlockTime());
|
int nMaxBlockTime = std::max(pCurrentBlockIndex->GetBlockTime(), pindexBestHeader->GetBlockTime());
|
||||||
|
Loading…
Reference in New Issue
Block a user