Skip to content

Commit

Permalink
log(p2p): add height to log for head verification failure
Browse files Browse the repository at this point in the history
  • Loading branch information
renaynay committed Sep 11, 2023
1 parent 77e5e17 commit 552390c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion p2p/exchange.go
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ func (ex *Exchange[H]) Head(ctx context.Context, opts ...header.HeadOption[H]) (
err = reqParams.TrustedHead.Verify(headers[0])
if err != nil {
log.Errorw("verifying head received from tracked peer", "tracked peer", from,
"err", err)
"height", headers[0].Height(), "err", err)
// bad head was given, block peer
ex.peerTracker.blockPeer(from, fmt.Errorf("returned bad head: %w", err))
headerRespCh <- zero
Expand Down

0 comments on commit 552390c

Please sign in to comment.