Skip to content

Commit

Permalink
heimdall/client: revert retryBackoff hack left behind (#12630)
Browse files Browse the repository at this point in the history
reverts a change from
73476ab#diff-ace6e4f24916671d83adb720ebd0fff8e611f09ed451f334e92e10aeb8591525R489-R491

not sure why this has been done - seems like a weird hack that has been
left behind maybe unintentionally - it is definitely unnecessary

main reason for removing is:
- it entirely circumvents the retryBackoff config of the client and
always overrides the value which is wrong
- it slows down tests a lot - this test should take milliseconds, but
after this change it takes a minute
![Screenshot 2024-11-05 at 15 57
08](https://github.com/user-attachments/assets/c8419264-5e73-4e0b-a600-93169b1d12bd)
  • Loading branch information
taratorio authored Nov 5, 2024
1 parent 2b248ca commit 685f6f0
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions polygon/heimdall/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -486,9 +486,6 @@ func FetchWithRetryEx[T any](
) (result *T, err error) {
attempt := 0
// create a new ticker for retrying the request
if client.retryBackOff < apiHeimdallTimeout {
client.retryBackOff = apiHeimdallTimeout + time.Second*2
}
ticker := time.NewTicker(client.retryBackOff)
defer ticker.Stop()

Expand Down

0 comments on commit 685f6f0

Please sign in to comment.