Skip to content

Commit

Permalink
Use a constant backoff retry strategy for retrieving the Flow transac…
Browse files Browse the repository at this point in the history
…tion result
  • Loading branch information
m-Peter committed Nov 25, 2024
1 parent 54ffc82 commit f6407e1
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions services/requester/pool.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,7 @@ func (t *TxPool) Send(
t.pool.Store(evmTx.Hash(), evmTx)
defer t.pool.Delete(evmTx.Hash())

backoff := retry.WithMaxDuration(time.Minute*3, retry.NewFibonacci(time.Millisecond*100))

backoff := retry.WithMaxDuration(time.Minute*1, retry.NewConstant(time.Second*1))
return retry.Do(ctx, backoff, func(ctx context.Context) error {
res, err := t.client.GetTransactionResult(ctx, flowTx.ID())
if err != nil {
Expand Down

0 comments on commit f6407e1

Please sign in to comment.