Skip to content

Commit bf84b22

Browse files
authored
fix(staking): add remove old UnbondingID func (#29)
1 parent b7c7e97 commit bf84b22

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

x/staking/keeper/unbonding.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,12 @@ func (k Keeper) GetOldUnbondingID(ctx context.Context) (unbondingID uint64, err
2525
return unbondingID, err
2626
}
2727

28+
func (k Keeper) RemoveOldUnbondingID(ctx context.Context) error {
29+
store := k.storeService.OpenKVStore(ctx)
30+
// Old UnbondingID used same key as period delegation, which is not used independently.
31+
return store.Delete(types.PeriodDelegationKey)
32+
}
33+
2834
func (k Keeper) GetUnbondingID(ctx context.Context) (unbondingID uint64, err error) {
2935
store := k.storeService.OpenKVStore(ctx)
3036
bz, err := store.Get(types.UnbondingIDKey)

0 commit comments

Comments
 (0)