Skip to content

Commit

Permalink
block fetcher: check if receipt is nil
Browse files Browse the repository at this point in the history
  • Loading branch information
colindickson committed Jul 16, 2024
1 parent 6d4b5ea commit 2b83bbd
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion blockfetcher/rpc.go
Original file line number Diff line number Diff line change
Expand Up @@ -112,11 +112,15 @@ func FetchReceipts(ctx context.Context, block *rpc.Block, client *rpc.Client) (o
hash := tx.Hash
eg.Go(func() error {
var receipt *rpc.TransactionReceipt
err := derr.RetryContext(ctx, 25, func(ctx context.Context) error {
err := derr.RetryContext(ctx, 10, func(ctx context.Context) error {
r, err := client.TransactionReceipt(ctx, hash)
if err != nil {
return err
}
if r == nil {
return fmt.Errorf("receipt is nil")
}

receipt = r
return nil
})
Expand Down

0 comments on commit 2b83bbd

Please sign in to comment.