Skip to content

Commit 45f90c5

Browse files
committed
Fix nil header bug
1 parent 095d997 commit 45f90c5

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

lib/blockchain/ethereum.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -731,7 +731,10 @@ func (e *EthereumClient) WaitForFinalizedTx(txHash common.Hash) (*big.Int, time.
731731
if err != nil {
732732
e.l.Err(err).Msg("Error fetching latest finalized header via HTTP polling")
733733
}
734-
734+
if latestHeader == nil {
735+
e.l.Error().Msg("Latest finalized header is nil")
736+
continue
737+
}
735738
if latestHeader.Time > math.MaxInt64 {
736739
e.l.Error().Msg("Latest finalized header time is too large")
737740
continue

0 commit comments

Comments
 (0)