Skip to content

Commit

Permalink
chore: add check for new FP slashed in processing of vp distribution …
Browse files Browse the repository at this point in the history
…cache
  • Loading branch information
RafilxTenfen committed Feb 26, 2025
1 parent 5958f0d commit b3dd27b
Show file tree
Hide file tree
Showing 4 changed files with 114 additions and 626 deletions.
7 changes: 7 additions & 0 deletions x/finality/keeper/power_dist_change.go
Original file line number Diff line number Diff line change
Expand Up @@ -348,6 +348,13 @@ func (k Keeper) ProcessAllPowerDistUpdateEvents(
// This is a consumer FP rather than Babylon FP, skip it
continue
}
// if the fp is slashed it shouldn't be included in the newDc
if newFP.IsSlashed() {
// case if a BTC delegation is created without inclusion proof
// the finality provider gets slashed
// inclusion proof gets included and generates an EventPowerDistUpdate_BtcDelStateUpdate
continue
}
fpDistInfo := ftypes.NewFinalityProviderDistInfo(newFP)

// check for jailing cases
Expand Down
Loading

0 comments on commit b3dd27b

Please sign in to comment.