mock

package
v0.19.0 Latest Latest
Warning

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

Go to latest
Published: Jun 13, 2018 License: Apache-2.0 Imports: 12 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckBalance

func CheckBalance(t *testing.T, app *App, addr sdk.Address, exp sdk.Coins)

check an account balance

func GenTx

func GenTx(msg sdk.Msg, accnums []int64, seq []int64, priv ...crypto.PrivKeyEd25519) auth.StdTx

generate a signed transaction

func SetGenesis

func SetGenesis(app *App, accs []auth.Account)

set the mock app genesis

func SignCheck

func SignCheck(t *testing.T, app *baseapp.BaseApp, msg sdk.Msg, accnums []int64, seq []int64, priv ...crypto.PrivKeyEd25519) sdk.Result

check a transaction result

func SignCheckDeliver

func SignCheckDeliver(t *testing.T, app *baseapp.BaseApp, msg sdk.Msg, accnums []int64, seq []int64, expPass bool, priv ...crypto.PrivKeyEd25519)

simulate a block

Types

type App

type App struct {
	*bam.BaseApp
	Cdc        *wire.Codec // public since the codec is passed into the module anyways.
	KeyMain    *sdk.KVStoreKey
	KeyAccount *sdk.KVStoreKey

	// TODO: Abstract this out from not needing to be auth specifically
	AccountMapper       auth.AccountMapper
	FeeCollectionKeeper auth.FeeCollectionKeeper

	GenesisAccounts []auth.Account
}

Extended ABCI application

func NewApp

func NewApp() *App

partially construct a new app on the memstore for module and genesis testing

func (*App) CompleteSetup

func (app *App) CompleteSetup(t *testing.T, newKeys []*sdk.KVStoreKey)

complete the application setup after the routes have been registered

func (*App) InitChainer

func (app *App) InitChainer(ctx sdk.Context, _ abci.RequestInitChain) abci.ResponseInitChain

custom logic for initialization

Jump to

Keyboard shortcuts

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