Skip to content

Commit

Permalink
fix!: ignore key shares for deactivated chains for unbonding checks (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
milapsheth authored Sep 5, 2023
1 parent 728bbc1 commit 85f47b7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
4 changes: 4 additions & 0 deletions x/ante/ante.go
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,10 @@ func (d UndelegateDecorator) AnteHandle(ctx sdk.Context, tx sdk.Tx, simulate boo
chains := d.nexus.GetChains(ctx)

for _, chain := range chains {
if !d.nexus.IsChainActivated(ctx, chain) {
continue
}

nextKeyID, idFound := d.multiSig.GetNextKeyID(ctx, chain.Name)
key, keyFound := d.multiSig.GetKey(ctx, nextKeyID)
if idFound && keyFound && !key.GetWeight(valAddress).IsZero() {
Expand Down
1 change: 1 addition & 0 deletions x/ante/types/expected_keepers.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ type MultiSig interface {
// Nexus provides access to the nexus functionality
type Nexus interface {
GetChains(ctx sdk.Context) []nexus.Chain
IsChainActivated(ctx sdk.Context, chain nexus.Chain) bool
}

// Snapshotter provides access to the snapshot functionality
Expand Down

0 comments on commit 85f47b7

Please sign in to comment.