Return info about network in socket.io getInfo request
parent
0783cac294
commit
f2284559d5
|
@ -575,12 +575,13 @@ type resultGetInfo struct {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s *SocketIoServer) getInfo() (res resultGetInfo, err error) {
|
func (s *SocketIoServer) getInfo() (res resultGetInfo, err error) {
|
||||||
// trezor is interested only in best block height
|
|
||||||
height, _, err := s.db.GetBestBlock()
|
height, _, err := s.db.GetBestBlock()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
res.Result.Blocks = int(height)
|
res.Result.Blocks = int(height)
|
||||||
|
res.Result.Testnet = s.chain.Testnet
|
||||||
|
res.Result.Network = s.chain.Network
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue