Return info about network in socket.io getInfo request

indexv1
Martin Boehm 2018-03-07 10:41:07 +01:00
parent 0783cac294
commit f2284559d5
1 changed files with 2 additions and 1 deletions

View File

@ -575,12 +575,13 @@ type resultGetInfo struct {
}
func (s *SocketIoServer) getInfo() (res resultGetInfo, err error) {
// trezor is interested only in best block height
height, _, err := s.db.GetBestBlock()
if err != nil {
return
}
res.Result.Blocks = int(height)
res.Result.Testnet = s.chain.Testnet
res.Result.Network = s.chain.Network
return
}