Skip to content

Commit 07de4bd

Browse files
authored
fail migration if there are pending ica txns for active channels (#528)
1 parent 3cbe961 commit 07de4bd

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

x/lscosmos/keeper/migrate_module.go

+5
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,11 @@ func (k Keeper) Migrate(ctx sdk.Context) error {
2424
// port all stores
2525
// HostChainParamsKey
2626

27+
pending, err := k.CheckPendingICATxs(ctx)
28+
if pending {
29+
return types.ErrModuleMigrationFailed.Wrapf("There are pending ica txs/ channels closed, err: %s", err)
30+
}
31+
2732
consensusState, err := k.liquidStakeIBCKeeper.GetLatestConsensusState(ctx, hcparams.ConnectionID)
2833
if err != nil {
2934
k.Logger(ctx).Error("could not retrieve client state", "host_chain", hcparams.ChainID)

0 commit comments

Comments
 (0)