simulation

package
v2.0.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 2, 2024 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultWeightMsgCreateService            int = 80
	DefaultWeightMsgUpdateService            int = 30
	DefaultWeightMsgActivateService          int = 60
	DefaultWeightMsgDeactivateService        int = 20
	DefaultWeightMsgTransferServiceOwnership int = 15
	DefaultWeightMsgDeleteService            int = 10
	DefaultWeightMsgSetServiceParams         int = 40

	OperationWeightMsgCreateService            = "op_weight_msg_create_service"
	OperationWeightMsgUpdateService            = "op_weight_msg_update_service"
	OperationWeightMsgActivateService          = "op_weight_msg_activate_service"
	OperationWeightMsgDeactivateService        = "op_weight_msg_deactivate_service"
	OperationWeightMsgTransferServiceOwnership = "op_weight_msg_transfer_service_ownership"
	OperationWeightMsgDeleteService            = "op_weight_msg_delete_service"
	OperationWeightMsgSetServiceParams         = "op_weight_msg_set_service_params"
)

Simulation operation weights constants

View Source
const (
	DefaultWeightMsgUpdateParams               int = 50
	DefaultWeightMsgAccreditService            int = 50
	DefaultWeightMsgRevokeServiceAccreditation int = 50

	OperationWeightMsgUpdateParams               = "op_weight_msg_update_params"
	OperationWeightMsgAccreditService            = "op_weight_msg_accredit_service"
	OperationWeightMsgRevokeServiceAccreditation = "op_weight_msg_revoke_service_accreditation"
)

Simulation operation weights constants

Variables

This section is empty.

Functions

func GetRandomExistingService

func GetRandomExistingService(r *rand.Rand, ctx sdk.Context, k *keeper.Keeper, filter func(s types.Service) bool) (types.Service, bool)

GetRandomExistingService returns a random existing service

func NewDecodeStore

func NewDecodeStore(keeper *keeper.Keeper) func(kvA kv.Pair, kvB kv.Pair) string

NewDecodeStore returns a decoder function closure that unmarshals the KVPair's Value to the corresponding services type.

func ProposalMsgs

func ProposalMsgs(keeper *keeper.Keeper) []simtypes.WeightedProposalMsg

ProposalMsgs defines the module weighted proposals' contents

func RandomParams

func RandomParams(r *rand.Rand, bondDenom string) types.Params

RandomParams returns a random params

func RandomService

func RandomService(r *rand.Rand, accs []simtypes.Account) types.Service

RandomService returns a random service

func RandomServiceParams

func RandomServiceParams(r *rand.Rand) types.ServiceParams

RandomServiceParams returns a random service params

func RandomizedGenState

func RandomizedGenState(simState *module.SimulationState)

RandomizedGenState generates a random GenesisState for the services module

func SimulateMsgAccreditService

func SimulateMsgAccreditService(
	k *keeper.Keeper,
) simtypes.MsgSimulatorFn

func SimulateMsgRevokeServiceAccreditation

func SimulateMsgRevokeServiceAccreditation(
	k *keeper.Keeper,
) simtypes.MsgSimulatorFn

func SimulateMsgUpdateParams

func SimulateMsgUpdateParams(r *rand.Rand, _ sdk.Context, _ []simtypes.Account) sdk.Msg

SimulateMsgUpdateParams returns a random MsgUpdateParams

func WeightedOperations

WeightedOperations returns all the operations from the module with their respective weights

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL