Skip to content

Commit 442345e

Browse files
committed
Merge branch '311-aggregator-wait-for-receipt-for-1-minute-if-not-bump-the-fee-v2' into test-aggregator-bump-fee
2 parents 0640e9c + 959694b commit 442345e

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

core/utils/eth_client_utils.go

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,16 +18,15 @@ const sleepTime = 1000 * time.Millisecond
1818

1919
func WaitForTransactionReceipt(client eth.InstrumentedClient, ctx context.Context, txHash gethcommon.Hash) (*types.Receipt, error) {
2020
for i := 0; i < maxRetries; i++ {
21-
receipt, err := client.TransactionReceipt(ctx, txHash)
21+
receipt, _ := client.TransactionReceipt(ctx, txHash)
22+
if receipt != nil {
23+
return receipt, nil
24+
}
2225
// if context has timed out, return
2326
if ctx.Err() != nil {
2427
return nil, ctx.Err()
25-
}
26-
if err != nil {
27-
time.Sleep(sleepTime)
28-
continue
2928
} else {
30-
return receipt, nil
29+
time.Sleep(sleepTime)
3130
}
3231
}
3332
return nil, fmt.Errorf("transaction receipt not found for txHash: %s", txHash.String())

0 commit comments

Comments
 (0)