Skip to content

Commit

Permalink
fix: invalid utf8 winner string
Browse files Browse the repository at this point in the history
  • Loading branch information
mrekucci committed Feb 6, 2024
1 parent 921cbc0 commit 6c31c45
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkg/l1Listener/l1Listener.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package l1Listener

import (
"bytes"
"context"
"math/big"
"time"
Expand Down Expand Up @@ -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()).
Expand Down

0 comments on commit 6c31c45

Please sign in to comment.