From 8be947f3b6b384d305d6046664ce050a3a71f659 Mon Sep 17 00:00:00 2001 From: Lazar Date: Thu, 24 Oct 2024 09:16:07 +0200 Subject: [PATCH] linter --- .../stakingeventwatcher.go | 29 ------------------- 1 file changed, 29 deletions(-) diff --git a/btcstaking-tracker/stakingeventwatcher/stakingeventwatcher.go b/btcstaking-tracker/stakingeventwatcher/stakingeventwatcher.go index f9e1ded..c241da2 100644 --- a/btcstaking-tracker/stakingeventwatcher/stakingeventwatcher.go +++ b/btcstaking-tracker/stakingeventwatcher/stakingeventwatcher.go @@ -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,