Skip to content

Commit

Permalink
fix: skip slashing event for delegations w/o inclusion proof (#98)
Browse files Browse the repository at this point in the history
* fix: skip slashing event for delegations w/o inclusion proof

---------

Co-authored-by: wjrjerome <[email protected]>
  • Loading branch information
gusin13 and jrwbabylonlab authored Dec 23, 2024
1 parent 8eefb80 commit 3bc234a
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions internal/services/delegation.go
Original file line number Diff line number Diff line change
Expand Up @@ -472,6 +472,14 @@ func (s *Service) processSlashedFinalityProviderEvent(
}

for _, delegation := range delegations {
if !delegation.HasInclusionProof() {
log.Debug().
Str("staking_tx", delegation.StakingTxHashHex).
Str("reason", "missing_inclusion_proof").
Msg("skipping slashed delegation event")
continue
}

if err := s.emitUnbondingDelegationEvent(ctx, delegation); err != nil {
return err
}
Expand Down

0 comments on commit 3bc234a

Please sign in to comment.