tests

package
v0.0.0-...-f2ae4c7 Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2020 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MakeTestAccAddress

func MakeTestAccAddress() sdk.AccAddress

MakeTestAccAddress creates an instant account address.

func MakeTestAccAddressFromPubKey

func MakeTestAccAddressFromPubKey(pubKey crypto.PubKey) sdk.AccAddress

MakeTestAccAddressFromPubKey creates a account address from a given public key.

func MakeTestAccount

MakeTestAccount creates an instant key-pair and associated addresses.

func MakeTestCodec

func MakeTestCodec(codecRegisters []CodecRegister) *codec.Codec

MakeTestCodec creates an instant codec and registers the modules in it for testing.

func MakeTestConsAddressFromPubKey

func MakeTestConsAddressFromPubKey(pubKey crypto.PubKey) sdk.ConsAddress

MakeTestConsAddressFromPubKey creates a consensus address from a given public key.

func MakeTestContext

func MakeTestContext(
	kvStoreKeys map[string]*sdk.KVStoreKey,
	transientStoreKeys map[string]*sdk.TransientStoreKey,
	isCheckTx bool,
	chainID string,
) sdk.Context

MakeTestContext creates an context instance for testing.

func MakeTestDB

func MakeTestDB() *dbm.MemDB

MakeTestDB creates an instant mem database.

func MakeTestPrivKey

func MakeTestPrivKey() crypto.PrivKey

MakeTestPrivKey creates an instant private key.

func MakeTestPubKey

func MakeTestPubKey() crypto.PubKey

MakeTestPubKey creates an instant public key.

func MakeTestPubKeyFromPrivKey

func MakeTestPubKeyFromPrivKey(privKey crypto.PrivKey) crypto.PubKey

MakeTestPubKeyFromPrivKey creates a public key from a private key.

func MakeTestStore

func MakeTestStore(
	db *dbm.MemDB,
	storeKeys map[string]*sdk.KVStoreKey,
	transientStoreKeys map[string]*sdk.TransientStoreKey,
) sdk.CommitMultiStore

MakeTestStore creates an instant private multi-store. Note: StoreKey mustn't be newly created / different from keeper's.

func MakeTestTimestampCurrent

func MakeTestTimestampCurrent() time.Time

MakeTestTimestampCurrent creates a current timestamp.

func MakeTestValAddressFromPubKey

func MakeTestValAddressFromPubKey(pubKey crypto.PubKey) sdk.ValAddress

MakeTestValAddressFromPubKey creates a validator address from a given public key.

Types

type CodecRegister

type CodecRegister func(*codec.Codec)

CodecRegister is the alias for module codec register function.

Jump to

Keyboard shortcuts

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