simulation

package
v0.15.5 Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2021 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

View Source
const (
	OpWeightMsgReportPost = "op_weight_msg_report_post"

	DefaultGasValue = 200000
)

Variables

This section is empty.

Functions

func NewDecodeStore added in v0.15.0

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

NewDecodeStore unmarshalls the KVPair's Reports to the corresponding reports type

func RandomPostID

func RandomPostID(r *rand.Rand) string

RandomPostID returns a randomly generated postID

func RandomReportMessage

func RandomReportMessage(r *rand.Rand) string

func RandomReportTypes

func RandomReportTypes(r *rand.Rand) string

func RandomizedGenState

func RandomizedGenState(simState *module.SimulationState)

func SimulateMsgReportPost

func SimulateMsgReportPost(
	pk postskeeper.Keeper, ak authkeeper.AccountKeeper, bk bankkeeper.Keeper,
) simtypes.Operation

SimulateMsgReportPost tests and runs a single MsgReportPost created by a random account. nolint: funlen

func WeightedOperations

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

Types

type ReportsData

type ReportsData struct {
	PostID  string
	Message string
	Type    string
	Creator simtypes.Account
}

func RandomReportsData

func RandomReportsData(r *rand.Rand, posts []posts.Post, accs []simtypes.Account) ReportsData

RandomReportsData returns a randomly generated ReportsData based on the given random posts and accounts list

Jump to

Keyboard shortcuts

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