This commit is contained in:
Evan Duffield 2015-08-13 09:39:12 -07:00
commit 9ee73cd238
4 changed files with 3 additions and 11 deletions

View File

@ -20,7 +20,6 @@
#include "wallet.h"
#endif
#include "masternode-payments.h"
#include "masternode-sync.h"
#include <boost/thread.hpp>
#include <boost/tuple/tuple.hpp>
@ -475,7 +474,7 @@ void static BitcoinMiner(CWallet *pwallet)
LOCK(cs_vNodes);
fvNodesEmpty = vNodes.empty();
}
if (!fvNodesEmpty && masternodeSync.IsSynced())
if (!fvNodesEmpty && !IsInitialBlockDownload())
break;
MilliSleep(1000);
} while (true);

View File

@ -19,7 +19,6 @@
#ifdef ENABLE_WALLET
#include "db.h"
#include "wallet.h"
#include "masternode-sync.h"
#endif
#include <stdint.h>
@ -443,11 +442,8 @@ Value getblocktemplate(const Array& params, bool fHelp)
if (vNodes.empty())
throw JSONRPCError(RPC_CLIENT_NOT_CONNECTED, "Dash is not connected!");
if (!masternodeSync.IsBlockchainSynced())
throw JSONRPCError(RPC_CLIENT_IN_BLOCKCHAIN_SYNC, "Dash is trying to sync blocks...");
if (!masternodeSync.IsSynced())
throw JSONRPCError(RPC_CLIENT_IN_ADDITIONAL_SYNC, "Dash is trying to sync additional data... Use 'mnsync status' to get more info.");
if (IsInitialBlockDownload())
throw JSONRPCError(RPC_CLIENT_IN_INITIAL_DOWNLOAD, "Dash is downloading blocks...");
static unsigned int nTransactionsUpdatedLast;

View File

@ -123,7 +123,6 @@ Value mnsync(const Array& params, bool fHelp)
Object obj;
obj.push_back(Pair("IsBlockchainSynced", masternodeSync.IsBlockchainSynced()));
obj.push_back(Pair("IsSynced", masternodeSync.IsSynced()));
obj.push_back(Pair("lastMasternodeList", masternodeSync.lastMasternodeList));
obj.push_back(Pair("lastMasternodeWinner", masternodeSync.lastMasternodeWinner));
obj.push_back(Pair("lastBudgetItem", masternodeSync.lastBudgetItem));

View File

@ -63,8 +63,6 @@ enum RPCErrorCode
//! P2P client errors
RPC_CLIENT_NOT_CONNECTED = -9, //! Dash is not connected
RPC_CLIENT_IN_INITIAL_DOWNLOAD = -10, //! Still downloading initial blocks
RPC_CLIENT_IN_BLOCKCHAIN_SYNC = -110,//! Syncing blocks
RPC_CLIENT_IN_ADDITIONAL_SYNC = -111,//! Syncing additional data
RPC_CLIENT_NODE_ALREADY_ADDED = -23, //! Node is already added
RPC_CLIENT_NODE_NOT_ADDED = -24, //! Node has not been added before