tests

package
v1.2.1-fast-validator Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2020 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateAddress

func CreateAddress() (types.Address, *ecdsa.PrivateKey)

CreateAddress returns random address and corresponding private key

func CreateApp

func CreateApp(state types.AppState) *minter.Blockchain

CreateApp creates and returns new Blockchain instance Recreates $HOME/.minter_test dir

func CreateTx

func CreateTx(app *minter.Blockchain, address types.Address, txType transaction.TxType, data interface{}) transaction.Transaction

CreateTx composes and returns Tx with given params. Nonce, chain id, gas price, gas coin and signature type fields are auto-filled.

func DefaultAppState

func DefaultAppState() types.AppState

DefaultAppState returns new AppState with some predefined values

func SendBeginBlock

func SendBeginBlock(app *minter.Blockchain) tmTypes.ResponseBeginBlock

SendBeginBlock sends BeginBlock message to given Blockchain instance

func SendCommit

func SendCommit(app *minter.Blockchain) tmTypes.ResponseCommit

SendCommit sends Commit message to given Blockchain instance

func SendEndBlock

func SendEndBlock(app *minter.Blockchain) tmTypes.ResponseEndBlock

SendEndBlock sends EndBlock message to given Blockchain instance

func SendTx

func SendTx(app *minter.Blockchain, bytes []byte) tmTypes.ResponseDeliverTx

SendTx sends DeliverTx message to given Blockchain instance

func SignTx

func SignTx(pk *ecdsa.PrivateKey, tx transaction.Transaction) []byte

SignTx returns bytes of signed with given pk transaction

Types

This section is empty.

Jump to

Keyboard shortcuts

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