mirror of
https://github.com/QuilibriumNetwork/ceremonyclient.git
synced 2026-02-27 21:37:35 +08:00
switched get node info response to use masterClock frame for maxFrame field (#212)
This commit is contained in:
parent
2bc8ab6a0a
commit
6ed6728bfd
@ -154,19 +154,9 @@ func (r *RPCServer) GetNodeInfo(
|
||||
if err != nil {
|
||||
return nil, errors.Wrap(err, "getting id from bytes")
|
||||
}
|
||||
|
||||
maxFrame := &protobufs.ClockFrame{}
|
||||
for _, e := range r.executionEngines {
|
||||
if frame := e.GetFrame(); frame != nil {
|
||||
if frameNr := frame.GetFrameNumber(); frameNr > maxFrame.GetFrameNumber() {
|
||||
maxFrame = frame
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
peerScore := r.pubSub.GetPeerScore(r.pubSub.GetPeerID())
|
||||
|
||||
return &protobufs.NodeInfoResponse{PeerId: peerID.String(), MaxFrame: maxFrame.GetFrameNumber(), PeerScore: uint64(peerScore), Version: config.GetVersion()}, nil
|
||||
return &protobufs.NodeInfoResponse{PeerId: peerID.String(), MaxFrame: r.masterClock.GetFrame().GetFrameNumber(), PeerScore: uint64(peerScore), Version: config.GetVersion()}, nil
|
||||
}
|
||||
|
||||
// GetPeerInfo implements protobufs.NodeServiceServer.
|
||||
|
||||
Loading…
Reference in New Issue
Block a user