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.
This commit is contained in:
parent
03fa5ea7fd
commit
66a17f8a47
1 changed files with 1 additions and 1 deletions
|
@ -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),
|
||||
|
|
Loading…
Add table
Reference in a new issue