#include "walletdb.h"
#include "bitcoinrpc.h"
#include "init.h"
+#include "util.h"
+#include "ntp.h"
#include "base58.h"
using namespace json_spirit;
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()));
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())));