Budget prop empty / version bump

This commit is contained in:
Evan Duffield 2015-07-29 01:08:15 -07:00
parent 0edb236801
commit f82a028869
4 changed files with 10 additions and 4 deletions

View File

@ -3,7 +3,7 @@ AC_PREREQ([2.60])
define(_CLIENT_VERSION_MAJOR, 0) define(_CLIENT_VERSION_MAJOR, 0)
define(_CLIENT_VERSION_MINOR, 12) define(_CLIENT_VERSION_MINOR, 12)
define(_CLIENT_VERSION_REVISION, 0) define(_CLIENT_VERSION_REVISION, 0)
define(_CLIENT_VERSION_BUILD, 32) define(_CLIENT_VERSION_BUILD, 33)
define(_CLIENT_VERSION_IS_RELEASE, true) define(_CLIENT_VERSION_IS_RELEASE, true)
define(_COPYRIGHT_YEAR, 2015) define(_COPYRIGHT_YEAR, 2015)
AC_INIT([Dash Core],[_CLIENT_VERSION_MAJOR._CLIENT_VERSION_MINOR._CLIENT_VERSION_REVISION],[info@dashpay.io],[dash]) AC_INIT([Dash Core],[_CLIENT_VERSION_MAJOR._CLIENT_VERSION_MINOR._CLIENT_VERSION_REVISION],[info@dashpay.io],[dash])

View File

@ -17,7 +17,7 @@
#define CLIENT_VERSION_MAJOR 0 #define CLIENT_VERSION_MAJOR 0
#define CLIENT_VERSION_MINOR 12 #define CLIENT_VERSION_MINOR 12
#define CLIENT_VERSION_REVISION 0 #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 //! Set to true for release, false for prerelease or test build
#define CLIENT_VERSION_IS_RELEASE true #define CLIENT_VERSION_IS_RELEASE true

View File

@ -63,6 +63,11 @@ void CMasternodeSync::AddedBudgetItem()
lastBudgetItem = GetTime(); lastBudgetItem = GetTime();
} }
bool CMasternodeSync::IsBudgetPropEmpty()
{
return sumBudgetItemProp==0 && countBudgetItemProp>0;
}
bool CMasternodeSync::IsBudgetFinEmpty() bool CMasternodeSync::IsBudgetFinEmpty()
{ {
return sumBudgetItemFin==0 && countBudgetItemFin>0; return sumBudgetItemFin==0 && countBudgetItemFin>0;
@ -268,7 +273,7 @@ void CMasternodeSync::Process()
if(RequestedMasternodeAssets == MASTERNODE_SYNC_BUDGET){ if(RequestedMasternodeAssets == MASTERNODE_SYNC_BUDGET){
//we'll start rejecting votes if we accidentally get set as synced too soon //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(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(); GetNextAsset();
//try to activate our masternode if possible //try to activate our masternode if possible

View File

@ -56,7 +56,8 @@ public:
void GetNextAsset(); void GetNextAsset();
void ProcessMessage(CNode* pfrom, std::string& strCommand, CDataStream& vRecv); void ProcessMessage(CNode* pfrom, std::string& strCommand, CDataStream& vRecv);
bool IsBudgetFinEmpty(); bool IsBudgetFinEmpty();
bool IsBudgetPropEmpty();
void Process(); void Process();
bool IsSynced(); bool IsSynced();
bool IsBlockchainSynced(); bool IsBlockchainSynced();