0g-chain/x/pricefeed/simulation/genesis.go
Ruaridh c7b1331f4d
Fix simulations (#377)
* stub out simulation integration for cdp, pricefeed

* stub out simulation integration for auction

* fix cdp export

* update pricefeed to match

* update validator-vesting to match
2020-02-25 10:11:09 -05:00

23 lines
710 B
Go

package simulation
import (
"fmt"
"github.com/cosmos/cosmos-sdk/codec"
"github.com/cosmos/cosmos-sdk/types/module"
"github.com/kava-labs/kava/x/pricefeed/types"
)
// RandomizedGenState generates a random GenesisState for pricefeed
func RandomizedGenState(simState *module.SimulationState) {
// TODO implement this fully
// - randomly generating the genesis params
// - overwriting with genesis provided to simulation
pricefeedGenesis := types.DefaultGenesisState()
fmt.Printf("Selected randomly generated %s parameters:\n%s\n", types.ModuleName, codec.MustMarshalJSONIndent(simState.Cdc, pricefeedGenesis))
simState.GenState[types.ModuleName] = simState.Cdc.MustMarshalJSON(pricefeedGenesis)
}