testutil

package
v2.1.1-0...-d24ec66 Latest Latest
Warning

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

Go to latest
Published: Jul 11, 2023 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateLogger

func CreateLogger() (log.Logger, *os.File)

func CreateTestAddresses

func CreateTestAddresses(prefix string, n int) ([]string, error)

CreateTestAddresses returns a []string of random addresses.

func DefaultContext

func DefaultContext(key storetypes.StoreKey, tkey storetypes.StoreKey) sdk.Context

DefaultContext creates a sdk.Context with a fresh MemDB that can be used in tests.

Types

type TestContext

type TestContext struct {
	Ctx sdk.Context
	DB  *dbm.MemDB
	CMS store.CommitMultiStore
}

func DefaultContextWithDB

func DefaultContextWithDB(t *testing.T, key storetypes.StoreKey, tkey storetypes.StoreKey) TestContext

Jump to

Keyboard shortcuts

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