Skip to content

Commit

Permalink
linter
Browse files Browse the repository at this point in the history
  • Loading branch information
Lazar955 committed Oct 24, 2024
1 parent 09c65f1 commit 8be947f
Showing 1 changed file with 0 additions and 29 deletions.
29 changes: 0 additions & 29 deletions btcstaking-tracker/stakingeventwatcher/stakingeventwatcher.go
Original file line number Diff line number Diff line change
Expand Up @@ -342,35 +342,6 @@ func tryParseStakerSignatureFromSpentTx(tx *wire.MsgTx, td *TrackedDelegation) (
return schnorr.ParseSignature(stakerSignature)
}

// waitForDelegationToStopBeingActive polls babylon until delegation is no longer active.
func (sew *StakingEventWatcher) waitForDelegationToStopBeingActive(
ctx context.Context,
stakingTxHash chainhash.Hash,
) {
_ = retry.Do(func() error {
active, err := sew.babylonNodeAdapter.IsDelegationActive(stakingTxHash)

if err != nil {
return fmt.Errorf("error checking if delegation is active: %v", err)
}

if !active {
return nil
}

return fmt.Errorf("delegation for staking tx %s is still active", stakingTxHash)
},
retry.Context(ctx),
retryForever,
fixedDelyTypeWithJitter,
retry.MaxDelay(sew.cfg.CheckDelegationActiveInterval),
retry.MaxJitter(sew.cfg.RetryJitter),
retry.OnRetry(func(n uint, err error) {
sew.logger.Debugf("retrying checking if delegation is active for staking tx %s. Attempt: %d. Err: %v", stakingTxHash, n, err)
}),
)
}

func (sew *StakingEventWatcher) reportUnbondingToBabylon(
ctx context.Context,
stakingTxHash chainhash.Hash,
Expand Down

0 comments on commit 8be947f

Please sign in to comment.