X-Git-Url: https://git.novaco.in/?p=novacoin.git;a=blobdiff_plain;f=src%2Frpcwallet.cpp;h=67c24e349b7f681486efb8f6f1af00752e035a11;hp=2414bdf512f4564fe74695dfef59ecdc99d158a6;hb=0c15e9be384df1db22a714c3ec77e9902df0492f;hpb=f8dc50f444b94ff21cf582f3686dcc41cb9971d8 diff --git a/src/rpcwallet.cpp b/src/rpcwallet.cpp index 2414bdf..67c24e3 100644 --- a/src/rpcwallet.cpp +++ b/src/rpcwallet.cpp @@ -7,6 +7,8 @@ #include "walletdb.h" #include "bitcoinrpc.h" #include "init.h" +#include "util.h" +#include "ntp.h" #include "base58.h" using namespace json_spirit; @@ -70,7 +72,7 @@ Value getinfo(const Array& params, bool fHelp) proxyType proxy; GetProxy(NET_IPV4, proxy); - Object obj, diff; + Object obj, diff, timestamping; obj.push_back(Pair("version", FormatFullVersion())); obj.push_back(Pair("protocolversion",(int)PROTOCOL_VERSION)); obj.push_back(Pair("walletversion", pwalletMain->GetVersion())); @@ -79,7 +81,18 @@ Value getinfo(const Array& params, bool fHelp) obj.push_back(Pair("newmint", ValueFromAmount(pwalletMain->GetNewMint()))); obj.push_back(Pair("stake", ValueFromAmount(pwalletMain->GetStake()))); obj.push_back(Pair("blocks", (int)nBestHeight)); - obj.push_back(Pair("timeoffset", (int64_t)GetTimeOffset())); + + timestamping.push_back(Pair("systemclock", GetTime())); + timestamping.push_back(Pair("adjustedtime", GetAdjustedTime())); + + int64_t nNtpOffset = GetNtpOffset(), + nP2POffset = GetNodesOffset(); + + timestamping.push_back(Pair("ntpoffset", nNtpOffset != INT64_MAX ? nNtpOffset : Value::null)); + timestamping.push_back(Pair("p2poffset", nP2POffset != INT64_MAX ? nP2POffset : Value::null)); + + obj.push_back(Pair("timestamping", timestamping)); + obj.push_back(Pair("moneysupply", ValueFromAmount(pindexBest->nMoneySupply))); obj.push_back(Pair("connections", (int)vNodes.size())); obj.push_back(Pair("proxy", (proxy.first.IsValid() ? proxy.first.ToStringIPPort() : string())));