Skip to content

Commit

Permalink
fix timelock
Browse files Browse the repository at this point in the history
  • Loading branch information
gusin13 committed Nov 24, 2024
1 parent c1da509 commit 5482619
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion internal/services/expiry_checker.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ func (s *Service) checkExpiry(ctx context.Context) *types.Error {
ctx,
delegation.StakingTxHashHex,
types.StateWithdrawable,
nil,
&tlDoc.DelegationSubState,
); err != nil {
log.Error().Err(err).Msg("Error updating BTC delegation state to withdrawable")
return types.NewInternalServiceError(
Expand Down
1 change: 1 addition & 0 deletions internal/services/watch_btc_events.go
Original file line number Diff line number Diff line change
Expand Up @@ -274,6 +274,7 @@ func (s *Service) startWatchingSlashingChange(
return fmt.Errorf("failed to get staking params: %w", err)
}
slashingChangeTimelockExpireHeight := spendingHeight + stakingParams.MinUnbondingTimeBlocks

// Save timelock expire to mark it as Withdrawn (sub state - timelock_slashing/early_unbonding_slashing)
if err := s.db.SaveNewTimeLockExpire(
ctx,
Expand Down

0 comments on commit 5482619

Please sign in to comment.