Skip to content

Commit

Permalink
add more logs
Browse files Browse the repository at this point in the history
  • Loading branch information
manav2401 committed Oct 10, 2023
1 parent 941b64b commit 05f9e87
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions eth/protocols/eth/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ func handleMessage(backend Backend, peer *Peer) error {
handlers = eth68
}

log.Info("***** In handle message", "peer.version", peer.Version())
log.Info("***** In handle message", "peer.version", peer.Version(), "msg.code", msg.Code)

// Track the amount of time it takes to serve the request and run the handler
if metrics.Enabled {
Expand All @@ -257,7 +257,8 @@ func handleMessage(backend Backend, peer *Peer) error {
}

if handler := handlers[msg.Code]; handler != nil {
return handler(backend, msg, peer)
err := handler(backend, msg, peer)
log.Info("***** Message handling failed", "err", err)
}

return fmt.Errorf("%w: %v", errInvalidMsgCode, msg.Code)
Expand Down

0 comments on commit 05f9e87

Please sign in to comment.