package
0.0.4
Repository: https://github.com/dfwallet/anatha.git
Documentation: pkg.go.dev

# Functions

BeginBlockEntry - operation entry for begin block.
CreateTransitionMatrix creates a transition matrix from the provided weights.
DeriveRand derives a new Rand deterministically from another random source.
EndBlockEntry - operation entry for end block.
FindAccount iterates over all the simulation accounts to find the one that matches the given address.
GetMemberOfInitialState takes an initial array of weights, of size n.
MsgEntry - operation entry for standard msg.
NewEventStats creates a new empty EventStats object.
LogWriter - return a dummy or standard log writer given the testingmode.
NewOperationEntry creates a new OperationEntry instance.
NewOperationMsg - create a new operation message from sdk.Msg.
NewOperationMsgBasic creates a new operation message from raw input.
NewOperationQueue creates a new OperationQueue instance.
NewSimParamChange creates a new ParamChange instance.
NewWeightedOperation creates a new WeightedOperation instance.
NoOpMsg - create a no-operation message.
QueuedMsgEntry creates an operation entry for a given queued message.
RandIntBetween returns a random int between two numbers inclusively.
RandomAcc picks and returns a random account from an array and returs its position in the array.
RandomAccounts generates n random accounts.
RandomAmount generates a random amount Note: The range of RandomAmount includes max, and is, in fact, biased to return max as well as 0.
RandomDecAmount generates a random decimal amount Note: The range of RandomDecAmount includes max, and is, in fact, biased to return max as well as 0.
RandomFees returns a random fee by selecting a random coin denomination and amount from the account's available balance.
RandomParams returns random simulation parameters.
RandomRequestBeginBlock generates a list of signing validators according to the provided list of validators, signing fraction, and evidence fraction.
RandPositiveInt get a rand positive sdk.Int.
RandStringOfLength generates a random string of a particular length.
returns random subset of the provided coins will return at least one coin unless coins argument is empty or malformed i.e.
RandTimestamp generates a random timestamp.
SimulateFromSeed tests an application by running the provided operations, testing the provided invariants, but using the provided config.Seed.

# Constants

entry kinds for use within OperationEntry.
entry kinds for use within OperationEntry.
entry kinds for use within OperationEntry.
entry kinds for use within OperationEntry.

# Structs

Account contains a privkey, pubkey, address tuple eventually more useful data can be placed in here.
Config contains the necessary configuration flags for the simulator.
_____________________ dummy log writter.
FutureOperation is an operation which will be ran at the beginning of the provided BlockHeight.
OperationEntry - an operation entry for logging (ex.
OperationMsg - structure for operation output.
ParamChange defines the object used for simulating parameter change proposals.
Params define the parameters necessary for running the simulations.
log writter.
TransitionMatrix is _almost_ a left stochastic matrix.
WeightedOperation is an operation with associated weight.
WeightedProposalContent defines a common struct for proposal contents defined by external modules (i.e outside gov).

# Interfaces

log writter.

# Type aliases

AppParams defines a flat JSON of key/values for all possible configurable simulation parameters.
AppStateFn returns the app state json bytes and the genesis accounts.
ContentSimulatorFn defines a function type alias for generating random proposal content.
EventStats defines an object that keeps a tally of each event that has occurred during a simulation.
Operation runs a state machine transition, and ensures the transition happened as expected.
OperationQueue defines an object for a queue of operations.
ParamSimulator creates a parameter value from a source of random number.
SimValFn function to generate the randomized parameter change value.
WeightedOperations is the group of all weighted operations to simulate.