Skip to content

Commit

Permalink
fix upgrade handler
Browse files Browse the repository at this point in the history
  • Loading branch information
mpoke committed Jan 19, 2024
1 parent 4626b78 commit 7b0cf50
Showing 1 changed file with 1 addition and 17 deletions.
18 changes: 1 addition & 17 deletions UPGRADING.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,21 +27,7 @@ func migrateICSOutstandingDowntime(ctx sdk.Context, keepers *upgrades.UpgradeKee
if err != nil {
return err
}
// Remove outstanding downtime flags for validators that have the
// signingInfo.JailedUntil zero (the initial value when a new signing
// info is created).
// The reasoning is that when a validator gets jailed on the consumer,
// signingInfo.JailedUntil is updated and the outstanding downtime flag
// is set. This flag is usually cleared when the consumer receives a
// VSCPacket with the validator's consensus address in the list of
// SlashAcks. Due to a bug, this mechanism was not working in versions
// <v4.0.0 (see https://github.com/cosmos/interchain-security/issues/1569).
// When a validator unjails itself, signingInfo.JailedUntil is reset to
// zero.
signingInfo, found := keepers.SlashingKeeper.GetValidatorSigningInfo(ctx, consAddr)
if found && signingInfo.JailedUntil == time.Unix(0, 0) {
keepers.ConsumerKeeper.DeleteOutstandingDowntime(ctx, consAddr)
}
keepers.ConsumerKeeper.DeleteOutstandingDowntime(ctx, consAddr)
}

ctx.Logger().Info("Finished ICS oustanding downtime")
Expand All @@ -50,8 +36,6 @@ func migrateICSOutstandingDowntime(ctx sdk.Context, keepers *upgrades.UpgradeKee
}
```



## [v3.3.x](https://github.com/cosmos/interchain-security/tree/release/v3.2.x)

### Provider
Expand Down

0 comments on commit 7b0cf50

Please sign in to comment.