Network decentralizatoin and bug fixes

This commit is contained in:
Michael Toutonghi
2018-08-09 15:32:48 -07:00
parent 5034d1c134
commit 0ba2065183
12 changed files with 83 additions and 906 deletions

View File

@@ -573,8 +573,8 @@ UniValue getblocktemplate(const UniValue& params, bool fHelp)
if (strMode != "template")
throw JSONRPCError(RPC_INVALID_PARAMETER, "Invalid mode");
if (vNodes.empty())
throw JSONRPCError(RPC_CLIENT_NOT_CONNECTED, "Komodo is not connected!");
if (Params().MiningRequiresPeers() && (!IsInSync() || vNodes.empty()))
throw JSONRPCError(RPC_CLIENT_NOT_CONNECTED, "Cannot get a block template while no peers are connected or chain not in sync!");
//if (IsInitialBlockDownload())
// throw JSONRPCError(RPC_CLIENT_IN_INITIAL_DOWNLOAD, "Zcash is downloading blocks...");