Versions in this module Expand all Collapse all v0 v0.34.7 Oct 3, 2019 Changes in this version + const BeginBlockEntryKind + const EndBlockEntryKind + const MsgEntryKind + const QueuedsgMsgEntryKind + func DeriveRand(r *rand.Rand) *rand.Rand + func GetMemberOfInitialState(r *rand.Rand, weights []int) int + func PeriodicInvariant(invariant sdk.Invariant, period int, offset int) sdk.Invariant + func RandIntBetween(r *rand.Rand, min, max int) int + func RandStringOfLength(r *rand.Rand, n int) string + func RandTimestamp(r *rand.Rand) time.Time + func RandomAmount(r *rand.Rand, max sdk.Int) sdk.Int + func RandomDecAmount(r *rand.Rand, max sdk.Dec) sdk.Dec + func RandomRequestBeginBlock(r *rand.Rand, params Params, validators mockValidators, pastTimes []time.Time, ...) abci.RequestBeginBlock + func Simulate(t *testing.T, app *baseapp.BaseApp, appStateFn AppStateFn, ...) (bool, error) + func SimulateFromSeed(tb testing.TB, app *baseapp.BaseApp, appStateFn AppStateFn, seed int64, ...) (stopEarly bool, simError error) + type Account struct + Address sdk.AccAddress + PrivKey crypto.PrivKey + PubKey crypto.PubKey + func RandomAcc(r *rand.Rand, accs []Account) Account + func RandomAccounts(r *rand.Rand, n int) []Account + func (acc Account) Equals(acc2 Account) bool + type AppStateFn func(r *rand.Rand, accs []Account, genesisTimestamp time.Time) (appState json.RawMessage, accounts []Account, chainId string) + type DummyLogWriter struct + func (lw *DummyLogWriter) AddEntry(_ OperationEntry) + func (lw *DummyLogWriter) PrintLogs() + type FutureOperation struct + BlockHeight int + BlockTime time.Time + Op Operation + type LogWriter interface + AddEntry func(OperationEntry) + PrintLogs func() + func NewLogWriter(testingmode bool) LogWriter + type Operation func(r *rand.Rand, app *baseapp.BaseApp, ctx sdk.Context, accounts []Account) (OperationMsg OperationMsg, futureOps []FutureOperation, err error) + type OperationEntry struct + EntryKind string + Height int64 + Operation json.RawMessage + Order int64 + func BeginBlockEntry(height int64) OperationEntry + func EndBlockEntry(height int64) OperationEntry + func MsgEntry(height int64, opMsg OperationMsg, order int64) OperationEntry + func QueuedMsgEntry(height int64, opMsg OperationMsg) OperationEntry + func (oe OperationEntry) MustMarshal() json.RawMessage + type OperationMsg struct + Comment string + Msg json.RawMessage + Name string + OK bool + Route string + func NewOperationMsg(msg sdk.Msg, ok bool, comment string) OperationMsg + func NewOperationMsgBasic(route, name, comment string, ok bool, msg []byte) OperationMsg + func NoOpMsg() OperationMsg + func (om OperationMsg) LogEvent(eventLogger func(string)) + func (om OperationMsg) MustMarshal() json.RawMessage + func (om OperationMsg) String() string + type OperationQueue map[int][]Operation + type Params struct + BlockSizeTransitionMatrix TransitionMatrix + EvidenceFraction float64 + InitialLivenessWeightings []int + LivenessTransitionMatrix TransitionMatrix + NumKeys int + PastEvidenceFraction float64 + func DefaultParams() Params + func RandomParams(r *rand.Rand) Params + type StandardLogWriter struct + OpEntries []OperationEntry + func (lw *StandardLogWriter) AddEntry(opEntry OperationEntry) + func (lw *StandardLogWriter) PrintLogs() + type TransitionMatrix struct + func CreateTransitionMatrix(weights [][]int) (TransitionMatrix, error) + func (t TransitionMatrix) NextState(r *rand.Rand, i int) int + type WeightedOperation struct + Op Operation + Weight int + type WeightedOperations []WeightedOperation