message: Added getinfoex
diff: @@ -1107,6 +1107,53 @@ UniValue getzerocoinsupply(const UniValue& params, bool fHelp)
  return result;
  }
  +UniValue getinfoex(const UniValue& params, bool fHelp)
  +{
  + if (fHelp || params.size() != 0)
  + throw runtime_error(
  + "getinfoex\n"
  + "An engineering version of getinfo. Takes significant time to finish.\n"
  + "Returns an object containing various state info.\n"
  + "\nResult:\n"
  + "{\n"
  + " \"version\": xxxxx, (numeric) the server version\n"
  + " \"protocolversion\": xxxxx, (numeric) the protocol version\n"
  + " \"walletversion\": xxxxx, (numeric) the wallet version\n"
  + " \"balance\": xxxxxxx, (numeric) the total bitcoin balance of the wallet\n"
  + " \"blocks\": xxxxxx, (numeric) the current number of blocks processed in the server\n"
  + " \"timeoffset\": xxxxx, (numeric) the time offset\n"
  + " \"connections\": xxxxx, (numeric) the number of connections\n"
  + " \"proxy\": \"host:port\", (string, optional) the proxy used by the server\n"
  + " \"difficulty\": xxxxxx, (numeric) the current difficulty\n"
  + " \"testnet\": true|false, (boolean) if the server is using testnet or not\n"
  + " \"keypoololdest\": xxxxxx, (numeric) the timestamp (seconds since Unix epoch) of the oldest pre-generated key in the key pool\n"
  + " \"keypoolsize\": xxxx, (numeric) how many new keys are pre-generated\n"
  + " \"unlocked_until\": ttt, (numeric) the timestamp in seconds since epoch (midnight Jan 1 1970 GMT) that the wallet is unlocked for transfers, or 0 if the wallet is locked\n"
  + " \"paytxfee\": x.xxxx, (numeric) the transaction fee set in " + CURRENCY_UNIT + "/kB\n"
  + " \"relayfee\": x.xxxx, (numeric) minimum relay fee for non-free transactions in " + CURRENCY_UNIT + "/kB\n"
  + " \"errors\": \"...\" (string) any error messages\n"
  + " \"moneysupply\": \"...\" (numeric) current coinbase supply summed with the current zerocoin supply\n"
  + "}\n"
  + "\nExamples:\n"
  + + HelpExampleCli("getinfo", "")
  + + HelpExampleRpc("getinfo", "")
  + );
  +
  + UniValue info = getinfo(params, fHelp);
  +
  + CAmount total = 0, zerocoin = 0;
  +
  + if(!pblocktree->ReadTotalSupply(total))
  + throw JSONRPCError(RPC_DATABASE_ERROR, "Cannot read the total supply from the database");
  +
  + if(!getZerocoinSupply(zerocoin))
  + throw JSONRPCError(RPC_DATABASE_ERROR, "Cannot read the total supply from the database");
  +
  + info.push_back(Pair("moneysupply", total + zerocoin));
  +
  + return info;
  +}
  +
  static const CRPCCommand commands[] =
  { // category name actor (function) okSafeMode
  @@ -1128,6 +1175,8 @@ static const CRPCCommand commands[] =
  /* Not shown in help */
  { "hidden", "setmocktime", &setmocktime, true },
  { "hidden", "getzerocoinsupply", &getzerocoinsupply, false },
  + { "hidden", "getinfoex", &getinfoex, false },
  +
  };
  void RegisterMiscRPCCommands(CRPCTable &tableRPC)
  