test

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2020 License: GPL-3.0 Imports: 27 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateTestInput

func CreateTestInput(t *testing.T, isCheckTx bool) (sdk.Context, staking.Keeper, checkpoint.Keeper)

init for test cases

func FindSigner

func FindSigner(signer ethcmn.Address, vals []types.Validator) bool

finds address in give validator slice

func GenRandCheckpointHeader

func GenRandCheckpointHeader(start int, headerSize int) (headerBlock types.CheckpointBlockHeader, err error)

create random header block

func GenRandomDividendAccount

func GenRandomDividendAccount(count int, startID uint64, randomise bool) (dividendAccounts []types.DividendAccount)

GenRandomDividendAccount random dividend accounts

func GenRandomVal

func GenRandomVal(count int, startBlock uint64, power int64, timeAlive uint64, randomise bool, startID uint64) (validators []types.Validator)

Generate random validators

func LoadValidatorSet

func LoadValidatorSet(count int, t *testing.T, keeper staking.Keeper, ctx sdk.Context, randomise bool, timeAlive int) types.ValidatorSet

Load Validator Set

func MakeTestCodec

func MakeTestCodec() *codec.Codec

func PrintVals

func PrintVals(t *testing.T, valset *types.ValidatorSet)

print validators

Types

This section is empty.

Jump to

Keyboard shortcuts

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