Skip to content

Commit

Permalink
Merge pull request #106 from renaynay/log
Browse files Browse the repository at this point in the history
chore(p2p): add height to log for head verification failure
  • Loading branch information
renaynay authored Sep 18, 2023
2 parents 77e5e17 + 552390c commit a6544e3
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 a6544e3

Please sign in to comment.