diff options
author | Peter Todd <pete@petertodd.org> | 2013-01-11 06:11:34 -0500 |
---|---|---|
committer | Peter Todd <pete@petertodd.org> | 2013-01-11 06:11:34 -0500 |
commit | 8686f6467c9db2606706baca33842c97ff7621f8 (patch) | |
tree | ab45e42d8fa8f0d4278a35e0d1030eadd9d80866 /src/rpcwallet.cpp | |
parent | 429915bd0dfcdb03b13d9a3c2fb82d5401ef70ce (diff) |
Add timeoffset to getinfo RPC call
Provides a method to get the difference between network adjusted time
and local time from the RPC interface.
Diffstat (limited to 'src/rpcwallet.cpp')
-rw-r--r-- | src/rpcwallet.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/rpcwallet.cpp b/src/rpcwallet.cpp index 90a68f560a..21eb2fd1aa 100644 --- a/src/rpcwallet.cpp +++ b/src/rpcwallet.cpp @@ -75,6 +75,7 @@ Value getinfo(const Array& params, bool fHelp) obj.push_back(Pair("walletversion", pwalletMain->GetVersion())); obj.push_back(Pair("balance", ValueFromAmount(pwalletMain->GetBalance()))); obj.push_back(Pair("blocks", (int)nBestHeight)); + obj.push_back(Pair("timeoffset", (boost::int64_t)GetTimeOffset())); obj.push_back(Pair("connections", (int)vNodes.size())); obj.push_back(Pair("proxy", (proxy.first.IsValid() ? proxy.first.ToStringIPPort() : string()))); obj.push_back(Pair("difficulty", (double)GetDifficulty())); |