Documentation ¶
Overview ¶
Package constructor provides constructors to easily initialize objects for test purpose with automatic error handling
Index ¶
- func Coin(t testing.TB, str string) sdk.Coin
- func Coins(t testing.TB, str string) sdk.Coins
- func Dec(t testing.TB, str string) sdkmath.LegacyDec
- func LastCommitInfo(votes ...Vote) comet.CommitInfo
- func MonitoringInfo(blockCount uint64, sc ...types.SignatureCount) (mi monitoringptypes.MonitoringInfo)
- func Shares(t testing.TB, coinStr string) projecttypes.Shares
- func SignatureCount(t testing.TB, opAddr string, relSig string) types.SignatureCount
- func SignatureCounts(blockCount uint64, sc ...types.SignatureCount) types.SignatureCounts
- func Vouchers(t testing.TB, coinStr string, projectID uint64) sdk.Coins
- type CommitInfo
- type Validator
- type Vote
- type VoteInfo
- type VoteInfos
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LastCommitInfo ¶
func LastCommitInfo(votes ...Vote) comet.CommitInfo
LastCommitInfo creates a ABCI LastCommitInfo object for test purpose from a list of vote
func MonitoringInfo ¶
func MonitoringInfo(blockCount uint64, sc ...types.SignatureCount) (mi monitoringptypes.MonitoringInfo)
MonitoringInfo returns a monitoring info object for tests from a a block count and list of signature counts
func Shares ¶
func Shares(t testing.TB, coinStr string) projecttypes.Shares
Shares returns a Shares object from a string of coin inputs
func SignatureCount ¶
SignatureCount returns a signature count object for test from a operator address and a decimal string for relative signatures
func SignatureCounts ¶
func SignatureCounts(blockCount uint64, sc ...types.SignatureCount) types.SignatureCounts
SignatureCounts returns a signature counts object for tests from a a block count and list of signature counts
Types ¶
type CommitInfo ¶
type CommitInfo struct {
abci.CommitInfo
}
func (CommitInfo) Round ¶
func (e CommitInfo) Round() int32
func (CommitInfo) Votes ¶
func (e CommitInfo) Votes() comet.VoteInfos
type Vote ¶
type Vote struct { Address []byte BlockID prototypes.BlockIDFlag }
Vote is a simplified type for abci.VoteInfo for testing purpose
type VoteInfo ¶
func (VoteInfo) GetBlockIDFlag ¶
func (v VoteInfo) GetBlockIDFlag() comet.BlockIDFlag