Skip to content

Commit

Permalink
Merge pull request #32 from primevprotocol/fix-invalid-utf8-winner
Browse files Browse the repository at this point in the history
fix: invalid utf8 winner string
  • Loading branch information
mrekucci authored Feb 6, 2024
2 parents 921cbc0 + 6c31c45 commit eb5a84e
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 eb5a84e

Please sign in to comment.