From 552390c8d152fb8b430105cc7a6638b3579852e9 Mon Sep 17 00:00:00 2001 From: rene <41963722+renaynay@users.noreply.github.com> Date: Mon, 11 Sep 2023 15:59:25 +0200 Subject: [PATCH] log(p2p): add height to log for head verification failure --- p2p/exchange.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/p2p/exchange.go b/p2p/exchange.go index 816ff7e8..c4dd8289 100644 --- a/p2p/exchange.go +++ b/p2p/exchange.go @@ -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