Skip to content

Commit

Permalink
Merge pull request #36 from samcm/fix/nil-block
Browse files Browse the repository at this point in the history
fix(execution): Panic fix - check for nil block
  • Loading branch information
samcm committed Jul 14, 2022
2 parents 6b2916e + eeb4a69 commit b8200e6
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pkg/exporter/pair/pair.go
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,10 @@ func (p *pair) fetchTotalDifficulty(ctx context.Context) error {
return err
}

if block == nil {
return errors.New("empty block found")
}

p.totalDifficulty = &block.TotalDifficulty

p.tdFetchedAt = time.Now()
Expand Down

0 comments on commit b8200e6

Please sign in to comment.