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
|
||||
var cdpGenesis cdp.GenesisState
|
||||
simState.Cdc.MustUnmarshalJSON(simState.GenState[cdp.ModuleName], &cdpGenesis)
|
||||
if len(CollateralDenoms) == 0 {
|
||||
for _, collateral := range cdpGenesis.Params.CollateralParams {
|
||||
CollateralDenoms = append(CollateralDenoms, collateral.Denom)
|
||||
}
|
||||
}
|
||||
|
||||
params := genParams(simState.Rand)
|
||||
|
||||
// Generate random reward and claim periods
|
||||
|
Loading…
Reference in New Issue
Block a user