Skip to content

Commit

Permalink
fix: safety
Browse files Browse the repository at this point in the history
Signed-off-by: SamMayWork <[email protected]>
  • Loading branch information
SamMayWork committed May 20, 2024
1 parent 7d84b1d commit bf4fe5c
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions internal/ethereum/blocklistener.go
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,12 @@ func (bl *blockListener) listenLoop() {
continue
}

if len(h) < 32 {
log.L(bl.ctx).Errorf("Cannot index block header hash of length: %d", len(h))
failCount++
continue
}

h = h[0:32]
}

Expand Down

0 comments on commit bf4fe5c

Please sign in to comment.