Skip to content

Commit

Permalink
chore: retry more when submitting headers (#155)
Browse files Browse the repository at this point in the history
Increase the default retry amount from default 5 which we have in bbn
client reliable send msg to 60
  • Loading branch information
Lazar955 authored Jan 7, 2025
1 parent e541143 commit 1f74a96
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)

* [#154](https://github.com/babylonlabs-io/vigilante/pull/154) fix: panic in maybeResendSecondTxOfCheckpointToBTC

### Improvements

* [#155](https://github.com/babylonlabs-io/vigilante/pull/155) chore: increase retry attempts for header reporter

## v0.19.0

### Bug Fixes
Expand Down
3 changes: 2 additions & 1 deletion reporter/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,14 +79,15 @@ func (r *Reporter) submitHeaderMsgs(msg *btclctypes.MsgInsertHeaders) error {
err := retrywrap.Do(func() error {
res, err := r.babylonClient.InsertHeaders(context.Background(), msg)
if err != nil {
return err
return fmt.Errorf("could not submit headers: %w", err)
}
r.logger.Infof("Successfully submitted %d headers to Babylon with response code %v", len(msg.Headers), res.Code)

return nil
},
retry.Delay(r.retrySleepTime),
retry.MaxDelay(r.maxRetrySleepTime),
bootstrapAttemptsAtt,
)
if err != nil {
r.metrics.FailedHeadersCounter.Add(float64(len(msg.Headers)))
Expand Down

0 comments on commit 1f74a96

Please sign in to comment.