Documentation ¶
Index ¶
- Constants
- Variables
- func DecodeStore(cdc *codec.Codec, kvA, kvB kv.Pair) string
- func GenBidDuration(r *rand.Rand) time.Duration
- func GenIncrementCollateral(r *rand.Rand) sdk.Dec
- func GenMaxAuctionDuration(r *rand.Rand) time.Duration
- func ParamChanges(r *rand.Rand) []simulation.ParamChange
- func RandInt(r *rand.Rand, inclusiveMin, exclusiveMax sdk.Int) (sdk.Int, error)
- func RandIntInclusive(r *rand.Rand, inclusiveMin, inclusiveMax sdk.Int) (sdk.Int, error)
- func RandomPositiveDuration(r *rand.Rand, inclusiveMin, exclusiveMax time.Duration) (time.Duration, error)
- func RandomizedGenState(simState *module.SimulationState)
- func SimulateMsgPlaceBid(ak auth.AccountKeeper, keeper keeper.Keeper) simulation.Operation
- func WeightedOperations(appParams simulation.AppParams, cdc *codec.Codec, ak auth.AccountKeeper, ...) simulation.WeightedOperations
Constants ¶
const ( // Calculate the average block time AverageBlockTime time.Duration = (maxTimePerBlock - minTimePerBlock) / 2 // MaxBidDuration is a crude way of ensuring that BidDuration ≤ MaxAuctionDuration for all generated params MaxBidDuration time.Duration = AverageBlockTime * 50 )
const (
OpWeightMsgPlaceBid = "op_weight_msg_place_bid"
)
Simulation operation weights constants
Variables ¶
var GenIncrementDebt = GenIncrementCollateral
var GenIncrementSurplus = GenIncrementCollateral
Functions ¶
func DecodeStore ¶
DecodeStore unmarshals the KVPair's Value to the corresponding auction type
func ParamChanges ¶
func ParamChanges(r *rand.Rand) []simulation.ParamChange
ParamChanges defines the parameters that can be modified by param change proposals on the simulation
func RandInt ¶ added in v0.8.0
RandInt randomly generates an sdk.Int in the range [inclusiveMin, exclusiveMax). It works for negative and positive integers.
func RandIntInclusive ¶ added in v0.8.0
RandIntInclusive randomly generates an sdk.Int in the range [inclusiveMin, inclusiveMax]. It works for negative and positive integers.
func RandomPositiveDuration ¶ added in v0.8.0
func RandomizedGenState ¶
func RandomizedGenState(simState *module.SimulationState)
RandomizedGenState generates a random GenesisState for auction
func SimulateMsgPlaceBid ¶ added in v0.8.0
func SimulateMsgPlaceBid(ak auth.AccountKeeper, keeper keeper.Keeper) simulation.Operation
SimulateMsgPlaceBid returns a function that runs a random state change on the module keeper. There's two error paths - return a OpMessage, but nil error - this will log a message but keep running the simulation - return an error - this will stop the simulation
func WeightedOperations ¶ added in v0.8.0
func WeightedOperations( appParams simulation.AppParams, cdc *codec.Codec, ak auth.AccountKeeper, k keeper.Keeper, ) simulation.WeightedOperations
WeightedOperations returns all the operations from the module with their respective weights
Types ¶
This section is empty.