github.com/cosmos/cosmos-sdk@v0.50.10/x/distribution/migrations/v3/json.go (about)

     1  package v3
     2  
     3  import (
     4  	sdkmath "cosmossdk.io/math"
     5  
     6  	"github.com/cosmos/cosmos-sdk/x/distribution/types"
     7  )
     8  
     9  // MigrateJSON accepts exported v2 (v0.46) x/distribution genesis state and migrates it to
    10  // v3 (v0.47) x/distribution genesis state. The migration includes:
    11  //
    12  // Reset of the deprecated rewards to zero.
    13  func MigrateJSON(oldState *types.GenesisState) *types.GenesisState {
    14  	// reset deprecated rewards to zero
    15  	oldState.Params.BaseProposerReward = sdkmath.LegacyZeroDec()
    16  	oldState.Params.BonusProposerReward = sdkmath.LegacyZeroDec()
    17  
    18  	return oldState
    19  }