Skip to content

Commit

Permalink
test: tweak waiting times
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcosNicolau committed Oct 18, 2024
1 parent 339d84f commit 41ce36a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion core/chainio/avs_writer.go
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ func (w *AvsWriter) SendAggregatedResponse(batchIdentifierHash [32]byte, batchMe
return nil, err
}
}
ctx, cancel := context.WithTimeout(context.Background(), time.Millisecond*200)
ctx, cancel := context.WithTimeout(context.Background(), time.Millisecond*2000)
defer cancel()
receipt, err := utils.WaitForTransactionReceipt(w.Client, ctx, tx.Hash())

Expand Down
3 changes: 2 additions & 1 deletion core/utils/eth_client_utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (
)

const maxRetries = 25
const sleepTime = 5 * time.Second
const sleepTime = 1000 * time.Millisecond

func WaitForTransactionReceipt(client eth.InstrumentedClient, ctx context.Context, txHash gethcommon.Hash) (*types.Receipt, error) {
for i := 0; i < maxRetries; i++ {
Expand All @@ -24,6 +24,7 @@ func WaitForTransactionReceipt(client eth.InstrumentedClient, ctx context.Contex
}
if err != nil {
time.Sleep(sleepTime)
continue
} else {
return receipt, nil
}
Expand Down

0 comments on commit 41ce36a

Please sign in to comment.