Documentation ¶
Index ¶
- Constants
- Variables
- func MakeBlockID() types.BlockID
- func MakeBlockIDWithHash(hash []byte) types.BlockID
- func MakeCommit(blockID types.BlockID, height int64, round int32, voteSet *types.VoteSet, ...) (*types.Commit, error)
- func MakeHeader(h *types.Header) (*types.Header, error)
- func MakeRandomHeader() *types.Header
- func MakeTenTxs(height int64) (txs []types.Tx)
- func MakeTxs(height int64, num int) (txs []types.Tx)
- func MakeVersion() version.Consensus
- func MakeVote(val types.PrivValidator, chainID string, valIndex int32, height int64, ...) (*types.Vote, error)
- func RandGenesisDoc(config *cfg.Config, numValidators int, randPower bool, minPower int64) (*types.GenesisDoc, []types.PrivValidator)
- func RandValidator(randPower bool, minPower int64) (*types.Validator, types.PrivValidator)
- func RandValidatorSet(numValidators int, votingPower int64) (*types.ValidatorSet, []types.PrivValidator)
- func RandomAddress() []byte
- func RandomHash() []byte
Constants ¶
View Source
const (
DefaultTestChainID = "test-chain"
)
Variables ¶
View Source
var (
DefaultTestTime = time.Date(2020, 1, 1, 0, 0, 0, 0, time.UTC)
)
Functions ¶
func MakeBlockID ¶
func MakeBlockIDWithHash ¶
func MakeCommit ¶
func MakeHeader ¶
MakeHeader fills the rest of the contents of the header such that it passes validate basic
func MakeRandomHeader ¶
func MakeTenTxs ¶
func MakeTxs ¶
MakeTxs is a helper function to generate mock transactions by given the block height and the transaction numbers.
func MakeVersion ¶
func RandGenesisDoc ¶
func RandGenesisDoc( config *cfg.Config, numValidators int, randPower bool, minPower int64) (*types.GenesisDoc, []types.PrivValidator)
func RandValidator ¶
func RandValidatorSet ¶
func RandValidatorSet(numValidators int, votingPower int64) (*types.ValidatorSet, []types.PrivValidator)
func RandomAddress ¶
func RandomAddress() []byte
func RandomHash ¶
func RandomHash() []byte
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.