From c283cef093c6ba7bfc80223d0e885c51783b428f Mon Sep 17 00:00:00 2001 From: Gurjot Date: Wed, 15 Jan 2025 16:16:10 +0530 Subject: [PATCH] fix log --- internal/services/watch_btc_events.go | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/internal/services/watch_btc_events.go b/internal/services/watch_btc_events.go index 125abdd..3b2af73 100644 --- a/internal/services/watch_btc_events.go +++ b/internal/services/watch_btc_events.go @@ -232,22 +232,10 @@ func (s *Service) handleSpendingStakingTransaction( // register unbonding spend notification return s.registerUnbondingSpendNotification(ctx, delegation) } else { - // the spending tx spends the unbonding path but the output is not valid - // we should log this case but no further action is needed. - registeredUnbondingTxBytes, parseErr := hex.DecodeString(delegation.UnbondingTx) - if parseErr != nil { - return fmt.Errorf("failed to decode unbonding tx: %w", parseErr) - } - - registeredUnbondingTx, parseErr := bbn.NewBTCTxFromBytes(registeredUnbondingTxBytes) - if parseErr != nil { - return fmt.Errorf("failed to parse unbonding tx: %w", parseErr) - } log.Error(). Str("staking_tx", delegation.StakingTxHashHex). Str("spending_tx", spendingTx.TxHash().String()). Str("spending_height", strconv.FormatUint(uint64(spendingHeight), 10)). - Str("registered_unbonding_tx", registeredUnbondingTx.TxHash().String()). Msg("detected unexpected unbonding transaction") return nil