From 6c31c45ca4d921d018103d64f3cabda5f9b3912d Mon Sep 17 00:00:00 2001 From: mrekucci <4932785+mrekucci@users.noreply.github.com> Date: Mon, 5 Feb 2024 23:41:07 -0300 Subject: [PATCH] fix: invalid utf8 winner string --- pkg/l1Listener/l1Listener.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkg/l1Listener/l1Listener.go b/pkg/l1Listener/l1Listener.go index 353c322..ad6d981 100644 --- a/pkg/l1Listener/l1Listener.go +++ b/pkg/l1Listener/l1Listener.go @@ -1,6 +1,7 @@ package l1Listener import ( + "bytes" "context" "math/big" "time" @@ -75,7 +76,7 @@ func (l *L1Listener) Start(ctx context.Context) <-chan struct{} { continue } - winner := string(header.Extra) + winner := string(bytes.ToValidUTF8(header.Extra, []byte("�"))) if len(winner) == 0 { log.Warn(). Int64("block", header.Number.Int64()).