From fa9e7609172fd562eedf97ac835eccecf893e095 Mon Sep 17 00:00:00 2001 From: mmsqe Date: Thu, 24 Aug 2023 21:33:15 +0800 Subject: [PATCH] fix CreationHeight --- x/cronos/client/cli/tx.go | 28 +++++++++++++++++++++++++--- 1 file changed, 25 insertions(+), 3 deletions(-) diff --git a/x/cronos/client/cli/tx.go b/x/cronos/client/cli/tx.go index f58e943d0f..0c9859a1e4 100644 --- a/x/cronos/client/cli/tx.go +++ b/x/cronos/client/cli/tx.go @@ -293,11 +293,33 @@ type ExportStakingValidator struct { UnbondingHeight int64 `json:"unbonding_height,string"` } +type ExportUnbondingDelegationEntry struct { + stakingtypes.UnbondingDelegationEntry + CreationHeight int64 `json:"creation_height,string"` +} + +type ExportUnbondingDelegation struct { + stakingtypes.UnbondingDelegation + Entries []ExportUnbondingDelegationEntry `json:"entries"` +} + +type ExportRedelegationEntry struct { + stakingtypes.RedelegationEntry + CreationHeight int64 `json:"creation_height,string"` +} + +type ExportRedelegation struct { + stakingtypes.Redelegation + Entries []ExportRedelegationEntry `json:"entries"` +} + type ExportStakingGenesisState struct { stakingtypes.GenesisState - Params ExportStakingParams `json:"params"` - LastValidatorPowers []ExportLastValidatorPower `json:"last_validator_powers"` - Validators []ExportStakingValidator `json:"validators"` + Params ExportStakingParams `json:"params"` + LastValidatorPowers []ExportLastValidatorPower `json:"last_validator_powers"` + Validators []ExportStakingValidator `json:"validators"` + UnbondingDelegations []ExportUnbondingDelegation `json:"unbonding_delegations"` + Redelegations []ExportRedelegation `json:"redelegations"` } func Migrate(appState genutiltypes.AppMap, clientCtx client.Context) genutiltypes.AppMap {