Skip to content

Commit 41ce36a

Browse files
committed
test: tweak waiting times
1 parent 339d84f commit 41ce36a

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

core/chainio/avs_writer.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ func (w *AvsWriter) SendAggregatedResponse(batchIdentifierHash [32]byte, batchMe
119119
return nil, err
120120
}
121121
}
122-
ctx, cancel := context.WithTimeout(context.Background(), time.Millisecond*200)
122+
ctx, cancel := context.WithTimeout(context.Background(), time.Millisecond*2000)
123123
defer cancel()
124124
receipt, err := utils.WaitForTransactionReceipt(w.Client, ctx, tx.Hash())
125125

core/utils/eth_client_utils.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import (
1313
)
1414

1515
const maxRetries = 25
16-
const sleepTime = 5 * time.Second
16+
const sleepTime = 1000 * time.Millisecond
1717

1818
func WaitForTransactionReceipt(client eth.InstrumentedClient, ctx context.Context, txHash gethcommon.Hash) (*types.Receipt, error) {
1919
for i := 0; i < maxRetries; i++ {
@@ -24,6 +24,7 @@ func WaitForTransactionReceipt(client eth.InstrumentedClient, ctx context.Contex
2424
}
2525
if err != nil {
2626
time.Sleep(sleepTime)
27+
continue
2728
} else {
2829
return receipt, nil
2930
}

0 commit comments

Comments
 (0)