Skip to content

Commit

Permalink
remove return err from handleNeighbourMSg
Browse files Browse the repository at this point in the history
  • Loading branch information
jimjbrettj committed Oct 15, 2024
1 parent 9b839a0 commit 4623d05
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions lib/grandpa/message_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ func (h *MessageHandler) handleMessage(from peer.ID, m GrandpaMessage) (network.

return nil, nil //nolint:nilnil
case *NeighbourPacketV1:
// we can afford to not retry handling neighbour message, if it errors.
return nil, h.handleNeighbourMessage(msg, from)
h.handleNeighbourMessage(msg, from)
return nil, nil //nolint:nilnil
case *CatchUpRequest:
return h.handleCatchUpRequest(msg)
case *CatchUpResponse:
Expand All @@ -78,14 +78,13 @@ func (h *MessageHandler) handleMessage(from peer.ID, m GrandpaMessage) (network.
}
}

func (h *MessageHandler) handleNeighbourMessage(packet *NeighbourPacketV1, from peer.ID) error { //nolint
func (h *MessageHandler) handleNeighbourMessage(packet *NeighbourPacketV1, from peer.ID) {
logger.Debugf("handling neighbour message from peer %v with set id %v and round %v",
from.ShortString(), packet.SetID, packet.Round)
h.grandpa.neighborMsgChan <- neighborData{
peer: from,
neighborMsg: packet,
}
return nil
}

func (h *MessageHandler) handleCatchUpRequest(msg *CatchUpRequest) (*ConsensusMessage, error) {
Expand Down

0 comments on commit 4623d05

Please sign in to comment.