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 ¶
BindFlagsLoadViper binds all flags and read the config into viper
func ConvertValidatorAddressToBech32String ¶
ConvertValidatorAddressToBech32String converts the given validator address to its Bech32 string representation
func ConvertValidatorPubKeyToBech32String ¶
ConvertValidatorPubKeyToBech32String converts the given pubKey to a Bech32 string
func FindAttributeByKey ¶
func FindEventByType ¶
Types ¶
type Block ¶
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 ¶
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 ¶
func NewBlockFromTmBlock(blk *tmctypes.ResultBlock, totalGas uint64) *Block
NewBlockFromTmBlock builds a new Block instance from a given ResultBlock object
type CobraCmdFunc ¶
CobraCmdFunc represents a cobra command function
func ConcatCobraCmdFuncs ¶
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 ¶
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 ¶
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