From f82a0288698e3bf3eeb473c50c5727b5dc725cc1 Mon Sep 17 00:00:00 2001 From: Evan Duffield Date: Wed, 29 Jul 2015 01:08:15 -0700 Subject: [PATCH] Budget prop empty / version bump --- configure.ac | 2 +- src/clientversion.h | 2 +- src/masternode-sync.cpp | 7 ++++++- src/masternode-sync.h | 3 ++- 4 files changed, 10 insertions(+), 4 deletions(-) diff --git a/configure.ac b/configure.ac index d9fd1ee61..ffe0eb913 100644 --- a/configure.ac +++ b/configure.ac @@ -3,7 +3,7 @@ AC_PREREQ([2.60]) define(_CLIENT_VERSION_MAJOR, 0) define(_CLIENT_VERSION_MINOR, 12) define(_CLIENT_VERSION_REVISION, 0) -define(_CLIENT_VERSION_BUILD, 32) +define(_CLIENT_VERSION_BUILD, 33) define(_CLIENT_VERSION_IS_RELEASE, true) define(_COPYRIGHT_YEAR, 2015) AC_INIT([Dash Core],[_CLIENT_VERSION_MAJOR._CLIENT_VERSION_MINOR._CLIENT_VERSION_REVISION],[info@dashpay.io],[dash]) diff --git a/src/clientversion.h b/src/clientversion.h index 3f848a5fc..7b3b66037 100644 --- a/src/clientversion.h +++ b/src/clientversion.h @@ -17,7 +17,7 @@ #define CLIENT_VERSION_MAJOR 0 #define CLIENT_VERSION_MINOR 12 #define CLIENT_VERSION_REVISION 0 -#define CLIENT_VERSION_BUILD 32 +#define CLIENT_VERSION_BUILD 33 //! Set to true for release, false for prerelease or test build #define CLIENT_VERSION_IS_RELEASE true diff --git a/src/masternode-sync.cpp b/src/masternode-sync.cpp index 63d2b23d5..8d210e825 100644 --- a/src/masternode-sync.cpp +++ b/src/masternode-sync.cpp @@ -63,6 +63,11 @@ void CMasternodeSync::AddedBudgetItem() lastBudgetItem = GetTime(); } +bool CMasternodeSync::IsBudgetPropEmpty() +{ + return sumBudgetItemProp==0 && countBudgetItemProp>0; +} + bool CMasternodeSync::IsBudgetFinEmpty() { return sumBudgetItemFin==0 && countBudgetItemFin>0; @@ -268,7 +273,7 @@ void CMasternodeSync::Process() if(RequestedMasternodeAssets == MASTERNODE_SYNC_BUDGET){ //we'll start rejecting votes if we accidentally get set as synced too soon if(lastBudgetItem > 0 && lastBudgetItem < GetTime() - MASTERNODE_SYNC_TIMEOUT && RequestedMasternodeAttempt >= 4){ //hasn't received a new item in the last five seconds, so we'll move to the - if(budget.HasNextFinalizedBudget() || nCountFailures >= 2 || (sumBudgetItemProp==0 && countBudgetItemProp>0)) { + if(budget.HasNextFinalizedBudget() || nCountFailures >= 2 || IsBudgetPropEmpty()) { GetNextAsset(); //try to activate our masternode if possible diff --git a/src/masternode-sync.h b/src/masternode-sync.h index 74e8d4cb1..74da058f9 100644 --- a/src/masternode-sync.h +++ b/src/masternode-sync.h @@ -56,7 +56,8 @@ public: void GetNextAsset(); void ProcessMessage(CNode* pfrom, std::string& strCommand, CDataStream& vRecv); bool IsBudgetFinEmpty(); - + bool IsBudgetPropEmpty(); + void Process(); bool IsSynced(); bool IsBlockchainSynced();