From 66a17f8a476c48250f980d88f068f39329d65094 Mon Sep 17 00:00:00 2001 From: Dave Collins Date: Fri, 23 Jan 2015 00:22:49 -0600 Subject: [PATCH] Return time offset in getinfo RPC. This was previously hard-coded to zero instead of using the offset provided by the median time source which takes time samples from the other connected nodes. --- rpcserver.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rpcserver.go b/rpcserver.go index cb8e20d4..ed886d1d 100644 --- a/rpcserver.go +++ b/rpcserver.go @@ -2089,7 +2089,7 @@ func handleGetInfo(s *rpcServer, cmd btcjson.Cmd, closeChan <-chan struct{}) (in Version: int32(1000000*appMajor + 10000*appMinor + 100*appPatch), ProtocolVersion: int32(maxProtocolVersion), Blocks: int32(height), - TimeOffset: 0, + TimeOffset: int64(s.server.timeSource.Offset().Seconds()), Connections: s.server.ConnectedCount(), Proxy: cfg.Proxy, Difficulty: getDifficultyRatio(blkHeader.Bits),