github.com/fibonacci-chain/fbc@v0.0.0-20231124064014-c7636198c1e9/libs/cosmos-sdk/x/distribution/legacy/v0_38/migrate.go (about) 1 package v0_38 2 3 // DONTCOVER 4 // nolint 5 6 import ( 7 v036distr "github.com/fibonacci-chain/fbc/libs/cosmos-sdk/x/distribution/legacy/v0_36" 8 ) 9 10 // Migrate accepts exported genesis state from v0.36 or v0.37 and migrates it to 11 // v0.38 genesis state. All entries are identical except for parameters. 12 func Migrate(oldGenState v036distr.GenesisState) GenesisState { 13 params := Params{ 14 CommunityTax: oldGenState.CommunityTax, 15 BaseProposerReward: oldGenState.BaseProposerReward, 16 BonusProposerReward: oldGenState.BonusProposerReward, 17 WithdrawAddrEnabled: oldGenState.WithdrawAddrEnabled, 18 } 19 20 return NewGenesisState( 21 params, oldGenState.FeePool, 22 oldGenState.DelegatorWithdrawInfos, oldGenState.PreviousProposer, 23 oldGenState.OutstandingRewards, oldGenState.ValidatorAccumulatedCommissions, 24 oldGenState.ValidatorHistoricalRewards, oldGenState.ValidatorCurrentRewards, 25 oldGenState.DelegatorStartingInfos, oldGenState.ValidatorSlashEvents, 26 ) 27 }