simulation

package
v1.9.0 Latest Latest
Warning

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

Go to latest
Published: May 14, 2024 License: Apache-2.0 Imports: 16 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	OpWeightMsgDefineService         = "op_weight_msg_define_service"
	OpWeightMsgBindService           = "op_weight_msg_bind_service"
	OpWeightMsgUpdateServiceBinding  = "op_weight_msg_update_service_binding"
	OpWeightMsgSetWithdrawAddress    = "op_weight_msg_set_withdraw_address"
	OpWeightMsgDisableServiceBinding = "op_weight_msg_disable_service_binding"
	OpWeightMsgEnableServiceBinding  = "op_weight_msg_enable_service_binding"
	OpWeightMsgRefundServiceDeposit  = "op_weight_msg_refund_service_deposit"
	OpWeightMsgCallService           = "op_weight_msg_call_service"
	OpWeightMsgRespondService        = "op_weight_msg_respond_service"
	OpWeightMsgStartRequestContext   = "op_weight_msg_start_request_context"
	OpWeightMsgPauseRequestContext   = "op_weight_msg_pause_request_context"
	OpWeightMsgKillRequestContext    = "op_weight_msg_kill_request_context"
	OpWeightMsgUpdateRequestContext  = "op_weight_msg_update_request_context"
	OpWeightMsgWithdrawEarnedFees    = "op_weight_msg_withdraw_earned_fees"
)

Simulation operation weights constants

View Source
const (
	DefaultWeightMsgDefineService         int = 100
	DefaultWeightMsgBindService           int = 80
	DefaultWeightMsgUpdateServiceBinding  int = 50
	DefaultWeightMsgSetWithdrawAddress    int = 20
	DefaultWeightMsgDisableServiceBinding int = 20
	DefaultWeightMsgEnableServiceBinding  int = 20
	DefaultWeightMsgRefundServiceDeposit  int = 20
	DefaultWeightMsgCallService           int = 100
	DefaultWeightMsgRespondService        int = 100
	DefaultWeightMsgStartRequestContext   int = 100
	DefaultWeightMsgPauseRequestContext   int = 100
	DefaultWeightMsgKillRequestContext    int = 100
	DefaultWeightMsgUpdateRequestContext  int = 100
	DefaultWeightMsgWithdrawEarnedFees    int = 20
)

Default simulation operation weights for messages

Variables

This section is empty.

Functions

func GenContextId added in v1.5.0

func GenContextId(r *rand.Rand, k keeper.Keeper, ctx sdk.Context) tmbytes.HexBytes

GenContextId randomized contextId

func GenPausedRequestContextId added in v1.5.0

func GenPausedRequestContextId(r *rand.Rand, k keeper.Keeper, ctx sdk.Context) tmbytes.HexBytes

GenPausedRequestContextId randomized pausedRequestContextId

func GenRequest added in v1.5.0

func GenRequest(r *rand.Rand, k keeper.Keeper, ctx sdk.Context) types.Request

GenRequest randomized request

func GenRequestContextId added in v1.5.0

func GenRequestContextId(r *rand.Rand, k keeper.Keeper, ctx sdk.Context) tmbytes.HexBytes

GenRequestContextId randomized requestContext

func GenRunningContextId added in v1.5.0

func GenRunningContextId(r *rand.Rand, k keeper.Keeper, ctx sdk.Context) tmbytes.HexBytes

GenRunningContextId randomized runningContextId

func GenServiceBinding added in v1.5.0

func GenServiceBinding(
	r *rand.Rand,
	k keeper.Keeper,
	ctx sdk.Context,
) (types.ServiceBinding, error)

GenServiceBinding randomized serviceBinding

func GenServiceBindingDisabled added in v1.5.0

func GenServiceBindingDisabled(
	r *rand.Rand,
	k keeper.Keeper,
	ctx sdk.Context,
) (types.ServiceBinding, error)

GenServiceBindingDisabled randomized serviceBindingDisabled

func GenServiceDefinition added in v1.5.0

func GenServiceDefinition(
	r *rand.Rand,
	k keeper.Keeper,
	ctx sdk.Context,
) (types.ServiceDefinition, error)

GenServiceDefinition randomized serviceDefinition

func GetProviders added in v1.5.0

func GetProviders(
	definition types.ServiceDefinition,
	k keeper.Keeper,
	ctx sdk.Context,
) (providers []string)

func NewDecodeStore

func NewDecodeStore(cdc codec.Codec) func(kvA, kvB kv.Pair) string

NewDecodeStore unmarshals the KVPair's Value to the corresponding service type

func SimulateMsgBindService

func SimulateMsgBindService(
	ak types.AccountKeeper,
	bk types.BankKeeper,
	k keeper.Keeper,
) simtypes.Operation

SimulateMsgBindService generates a MsgBindService with random values.

func SimulateMsgCallService added in v1.5.0

func SimulateMsgCallService(
	ak types.AccountKeeper,
	bk types.BankKeeper,
	k keeper.Keeper,
) simtypes.Operation

SimulateMsgCallService generates a MsgCallService with random values.

func SimulateMsgDefineService

func SimulateMsgDefineService(
	ak types.AccountKeeper,
	bk types.BankKeeper,
	k keeper.Keeper,
) simtypes.Operation

SimulateMsgDefineService generates a MsgDefineService with random values.

func SimulateMsgDisableServiceBinding

func SimulateMsgDisableServiceBinding(
	ak types.AccountKeeper,
	bk types.BankKeeper,
	k keeper.Keeper,
) simtypes.Operation

SimulateMsgDisableServiceBinding generates a MsgDisableServiceBinding with random values.

func SimulateMsgEnableServiceBinding

func SimulateMsgEnableServiceBinding(
	ak types.AccountKeeper,
	bk types.BankKeeper,
	k keeper.Keeper,
) simtypes.Operation

SimulateMsgEnableServiceBinding generates a MsgEnableServiceBinding with random values.

func SimulateMsgKillRequestContext added in v1.5.0

func SimulateMsgKillRequestContext(
	ak types.AccountKeeper,
	bk types.BankKeeper,
	k keeper.Keeper,
) simtypes.Operation

SimulateMsgKillRequestContext generates a MsgKillRequestContext with random values.

func SimulateMsgPauseRequestContext added in v1.5.0

func SimulateMsgPauseRequestContext(
	ak types.AccountKeeper,
	bk types.BankKeeper,
	k keeper.Keeper,
) simtypes.Operation

SimulateMsgPauseRequestContext generates a MsgSPauseRequestContext with random values.

func SimulateMsgRefundServiceDeposit

func SimulateMsgRefundServiceDeposit(
	ak types.AccountKeeper,
	bk types.BankKeeper,
	k keeper.Keeper,
) simtypes.Operation

SimulateMsgRefundServiceDeposit generates a MsgRefundServiceDeposit with random values.

func SimulateMsgRespondService added in v1.5.0

func SimulateMsgRespondService(
	ak types.AccountKeeper,
	bk types.BankKeeper,
	k keeper.Keeper,
) simtypes.Operation

SimulateMsgRespondService generates a MsgRespondService with random values.

func SimulateMsgSetWithdrawAddress

func SimulateMsgSetWithdrawAddress(
	ak types.AccountKeeper,
	bk types.BankKeeper,
	k keeper.Keeper,
) simtypes.Operation

SimulateMsgSetWithdrawAddress generates a MsgSetWithdrawAddress with random values.

func SimulateMsgStartRequestContext added in v1.5.0

func SimulateMsgStartRequestContext(
	ak types.AccountKeeper,
	bk types.BankKeeper,
	k keeper.Keeper,
) simtypes.Operation

SimulateMsgStartRequestContext generates a MsgStartRequestContext with random values.

func SimulateMsgUpdateRequestContext added in v1.5.0

func SimulateMsgUpdateRequestContext(
	ak types.AccountKeeper,
	bk types.BankKeeper,
	k keeper.Keeper,
) simtypes.Operation

SimulateMsgUpdateRequestContext generates a MsgUpdateRequestContext with random values.

func SimulateMsgUpdateServiceBinding

func SimulateMsgUpdateServiceBinding(
	ak types.AccountKeeper,
	bk types.BankKeeper,
	k keeper.Keeper,
) simtypes.Operation

SimulateMsgUpdateServiceBinding generates a MsgUpdateServiceBinding with random values.

func SimulateMsgWithdrawEarnedFees added in v1.5.0

func SimulateMsgWithdrawEarnedFees(
	ak types.AccountKeeper,
	bk types.BankKeeper,
	k keeper.Keeper,
) simtypes.Operation

SimulateMsgWithdrawEarnedFees generates a MsgWithdrawEarnedFees with random values.

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