Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v14 cleanup #1017

Merged
merged 2 commits into from
Dec 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 0 additions & 7 deletions x/stakeibc/keeper/icacallbacks_delegate.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package keeper

import (
"errors"
"fmt"

"github.com/spf13/cast"
Expand Down Expand Up @@ -67,12 +66,6 @@ func (k Keeper) DelegateCallback(ctx sdk.Context, packet channeltypes.Packet, ac
// Regardless of failure/success/timeout, indicate that this ICA has completed
for _, splitDelegation := range delegateCallback.SplitDelegations {
if err := k.DecrementValidatorDelegationChangesInProgress(&hostZone, splitDelegation.Validator); err != nil {
// TODO: Revert after v14 upgrade
if errors.Is(err, types.ErrInvalidValidatorDelegationUpdates) {
k.Logger(ctx).Error(utils.LogICACallbackWithHostZone(chainId, ICACallbackID_Delegate,
"Invariant failed - delegation changes in progress fell below 0 for %s", splitDelegation.Validator))
continue
}
return err
}
}
Expand Down
6 changes: 0 additions & 6 deletions x/stakeibc/keeper/icacallbacks_undelegate.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,6 @@ func (k Keeper) UndelegateCallback(ctx sdk.Context, packet channeltypes.Packet,
}
for _, splitDelegation := range undelegateCallback.SplitDelegations {
if err := k.DecrementValidatorDelegationChangesInProgress(&hostZone, splitDelegation.Validator); err != nil {
// TODO: Revert after v14 upgrade
if errors.Is(err, types.ErrInvalidValidatorDelegationUpdates) {
k.Logger(ctx).Error(utils.LogICACallbackWithHostZone(chainId, ICACallbackID_Undelegate,
"Invariant failed - delegation changes in progress fell below 0 for %s", splitDelegation.Validator))
continue
}
return err
}
}
Expand Down
Loading