ethstats: pass engine protocol name for quorum

This commit is contained in:
amalraj.manigmail.com 2018-10-12 00:43:30 +08:00
parent c0373acd72
commit 46472a2b64
1 changed files with 3 additions and 1 deletions

View File

@ -373,7 +373,9 @@ func (s *Service) login(conn *websocket.Conn) error {
infos := s.server.NodeInfo()
var network, protocol string
if info := infos.Protocols["eth"]; info != nil {
//must pass engine protocol name for quorum
p := s.engine.Protocol()
if info := infos.Protocols[p.Name]; info != nil {
network = fmt.Sprintf("%d", info.(*eth.NodeInfo).Network)
protocol = fmt.Sprintf("eth/%d", eth.ProtocolVersions[0])
} else {