simulation

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2019 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SimulateMsgDeposit

func SimulateMsgDeposit(k gov.Keeper) simulation.Operation

SimulateMsgDeposit generates a MsgDeposit with random values.

func SimulateMsgVote

func SimulateMsgVote(k gov.Keeper) simulation.Operation

SimulateMsgVote generates a MsgVote with random values.

func SimulateSubmittingVotingAndSlashingForProposal

func SimulateSubmittingVotingAndSlashingForProposal(k gov.Keeper, contentSim ContentSimulator) simulation.Operation

SimulateSubmittingVotingAndSlashingForProposal simulates creating a msg Submit Proposal voting on the proposal, and subsequently slashing the proposal. It is implemented using future operations. TODO: Vote more intelligently, so we can actually do some checks regarding votes passing or failing TODO: Actually check that validator slashings happened

func SimulateTextProposalContent

func SimulateTextProposalContent(r *rand.Rand, _ *baseapp.BaseApp, _ sdk.Context, _ []simulation.Account) gov.Content

SimulateTextProposalContent returns random text proposal content.

Types

type ContentSimulator

type ContentSimulator func(r *rand.Rand, app *baseapp.BaseApp, ctx sdk.Context, accs []simulation.Account) gov.Content

ContentSimulator defines a function type alias for generating random proposal content.

Jump to

Keyboard shortcuts

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