Skip to content

Commit

Permalink
Merge pull request #672 from onflow/mpeter/update-backoff-retry-strategy
Browse files Browse the repository at this point in the history
Use a constant backoff retry strategy for retrieving the Flow transaction result
  • Loading branch information
m-Peter authored Nov 26, 2024
2 parents 0de5ef9 + 39812e5 commit 01bb8e7
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 01bb8e7

Please sign in to comment.