From d227f28621e31cc4bf58f6b4cf839a9651b151cd Mon Sep 17 00:00:00 2001 From: Evan Duffield Date: Sun, 26 Jul 2015 12:37:01 -0700 Subject: [PATCH] allow masternodes to turn on pre-sync - udjin --- src/activemasternode.cpp | 2 +- src/masternode-sync.cpp | 5 +++++ src/masternode-sync.h | 1 + 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/activemasternode.cpp b/src/activemasternode.cpp index bba53c065..45aa3f6b8 100644 --- a/src/activemasternode.cpp +++ b/src/activemasternode.cpp @@ -17,7 +17,7 @@ void CActiveMasternode::ManageStatus() if (fDebug) LogPrintf("CActiveMasternode::ManageStatus() - Begin\n"); //need correct blocks to send ping - if(Params().NetworkID() != CBaseChainParams::REGTEST && !masternodeSync.IsSynced()) { + if(Params().NetworkID() != CBaseChainParams::REGTEST && !masternodeSync.IsListSyncStarted()) { status = ACTIVE_MASTERNODE_SYNC_IN_PROCESS; LogPrintf("CActiveMasternode::ManageStatus() - %s\n", GetStatus()); return; diff --git a/src/masternode-sync.cpp b/src/masternode-sync.cpp index 841aaa834..579e6d872 100644 --- a/src/masternode-sync.cpp +++ b/src/masternode-sync.cpp @@ -28,6 +28,11 @@ bool CMasternodeSync::IsSynced() return RequestedMasternodeAssets == MASTERNODE_SYNC_FINISHED; } +bool CMasternodeSync::IsListSyncStarted() +{ + return RequestedMasternodeAssets >= MASTERNODE_SYNC_LIST; +} + void CMasternodeSync::AddedMasternodeList() { lastMasternodeList = GetTime(); diff --git a/src/masternode-sync.h b/src/masternode-sync.h index 96f199186..83706a55c 100644 --- a/src/masternode-sync.h +++ b/src/masternode-sync.h @@ -44,6 +44,7 @@ public: void Process(); bool IsSynced(); + bool IsListSyncStarted(); }; #endif