mirror of
https://github.com/0glabs/0g-chain.git
synced 2025-01-13 08:45:18 +00:00
fix: populate collateral denoms once (#551)
This commit is contained in:
parent
f97580c773
commit
5723001390
@ -26,9 +26,12 @@ func RandomizedGenState(simState *module.SimulationState) {
|
|||||||
// Get collateral asset denoms from existing CDP genesis state and pass to incentive params
|
// Get collateral asset denoms from existing CDP genesis state and pass to incentive params
|
||||||
var cdpGenesis cdp.GenesisState
|
var cdpGenesis cdp.GenesisState
|
||||||
simState.Cdc.MustUnmarshalJSON(simState.GenState[cdp.ModuleName], &cdpGenesis)
|
simState.Cdc.MustUnmarshalJSON(simState.GenState[cdp.ModuleName], &cdpGenesis)
|
||||||
for _, collateral := range cdpGenesis.Params.CollateralParams {
|
if len(CollateralDenoms) == 0 {
|
||||||
CollateralDenoms = append(CollateralDenoms, collateral.Denom)
|
for _, collateral := range cdpGenesis.Params.CollateralParams {
|
||||||
|
CollateralDenoms = append(CollateralDenoms, collateral.Denom)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
params := genParams(simState.Rand)
|
params := genParams(simState.Rand)
|
||||||
|
|
||||||
// Generate random reward and claim periods
|
// Generate random reward and claim periods
|
||||||
|
Loading…
Reference in New Issue
Block a user