Populate connections field in getinfo RPC.

The JSON object returned from the getinfo RPC contains a connection count
field that was not being populated.
This commit is contained in:
Dave Collins 2014-05-03 14:07:08 -05:00
parent 0a7543516c
commit 4178c36dc3

View file

@ -1122,6 +1122,7 @@ func handleGetInfo(s *rpcServer, cmd btcjson.Cmd) (interface{}, error) {
ProtocolVersion: int(btcwire.ProtocolVersion),
Blocks: int(height),
TimeOffset: 0,
Connections: s.server.ConnectedCount(),
Proxy: cfg.Proxy,
Difficulty: getDifficultyRatio(blkHeader.Bits),
TestNet: cfg.TestNet3,