From 3bc234a26050f9969f53c349edb689a7bebfb9e8 Mon Sep 17 00:00:00 2001 From: Gurjot Singh <111540954+gusin13@users.noreply.github.com> Date: Mon, 23 Dec 2024 06:27:10 +0530 Subject: [PATCH] fix: skip slashing event for delegations w/o inclusion proof (#98) * fix: skip slashing event for delegations w/o inclusion proof --------- Co-authored-by: wjrjerome --- internal/services/delegation.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/internal/services/delegation.go b/internal/services/delegation.go index ce61238..05f52f5 100644 --- a/internal/services/delegation.go +++ b/internal/services/delegation.go @@ -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 }