Documentation ¶
Index ¶
- func BindFlagsLoadViper(cmd *cobra.Command, _ []string) error
- func ConvertValidatorAddressToBech32String(address types.Address) string
- func ConvertValidatorPubKeyToBech32String(pubKey tmcrypto.PubKey) (string, error)
- func FindAttributeByKey(event abci.Event, attrKey string) (abci.EventAttribute, error)
- func FindEventByType(events []abci.Event, eventType string) (abci.Event, error)
- func FindEventsByType(events []abci.Event, eventType string) []abci.Event
- type Block
- type CobraCmdFunc
- type CommitSig
- type HeightQueue
- type Message
- type Tx
- type Validator
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BindFlagsLoadViper ¶ added in v0.0.9
BindFlagsLoadViper binds all flags and read the config into viper
func ConvertValidatorAddressToBech32String ¶ added in v0.0.9
ConvertValidatorAddressToBech32String converts the given validator address to its Bech32 string representation
func ConvertValidatorPubKeyToBech32String ¶ added in v0.0.9
ConvertValidatorPubKeyToBech32String converts the given pubKey to a Bech32 string
func FindAttributeByKey ¶ added in v0.0.9
func FindEventByType ¶ added in v0.0.9
Types ¶
type Block ¶ added in v0.0.9
type Block struct { Height int64 Hash string TxNum int TotalGas uint64 ProposerAddress string Timestamp time.Time }
Block contains the data of a single chain block
func NewBlock ¶ added in v0.0.9
func NewBlock( height int64, hash string, txNum int, totalGas uint64, proposerAddress string, timestamp time.Time, ) *Block
NewBlock allows to build a new Block instance
func NewBlockFromTmBlock ¶ added in v0.0.9
func NewBlockFromTmBlock(blk *tmctypes.ResultBlock, totalGas uint64) *Block
NewBlockFromTmBlock builds a new Block instance from a given ResultBlock object
type CobraCmdFunc ¶ added in v0.0.9
CobraCmdFunc represents a cobra command function
func ConcatCobraCmdFuncs ¶ added in v0.0.9
func ConcatCobraCmdFuncs(fs ...CobraCmdFunc) CobraCmdFunc
ConcatCobraCmdFuncs returns a single function that calls each argument function in sequence RunE, PreRunE, PersistentPreRunE, etc. all have this same signature
type CommitSig ¶ added in v0.0.9
type CommitSig struct { Height int64 ValidatorAddress string VotingPower int64 ProposerPriority int64 Timestamp time.Time }
CommitSig contains the data of a single validator commit signature
type HeightQueue ¶ added in v0.0.9
type HeightQueue chan int64
HeightQueue is a simple type alias for a (buffered) channel of block heights.
func NewQueue ¶
func NewQueue(size int) HeightQueue
type Tx ¶
type Tx struct { *tx.Tx *sdk.TxResponse }
Tx represents an already existing blockchain transaction
func (Tx) FindAttributeByKey ¶
FindAttributeByKey searches inside the specified event of the given tx to find the attribute having the given key. If the specified event does not contain a such attribute, returns an error instead.
func (Tx) FindEventByType ¶
FindEventByType searches inside the given tx events for the message having the specified index, in order to find the event having the given type, and returns it. If no such event is found, returns an error instead.
func (Tx) Successful ¶
Successful tells whether this tx is successful or not