diff --git a/ethreceipts/ethreceipts.go b/ethreceipts/ethreceipts.go index bcf71d1..34a8b42 100644 --- a/ethreceipts/ethreceipts.go +++ b/ethreceipts/ethreceipts.go @@ -754,7 +754,8 @@ func (l *ReceiptsListener) getMaxWaitBlocks(maxWait *int) uint64 { } func (l *ReceiptsListener) isBlockFinal(blockNum *big.Int) bool { - if l == nil || l.latestBlockNum() == nil || blockNum == nil { + latestBlockNum := l.latestBlockNum() + if latestBlockNum == nil || blockNum == nil { return false } diff := big.NewInt(0).Sub(l.latestBlockNum(), blockNum)