runner

package
v0.0.0-...-89b98da Latest Latest
Warning

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

Go to latest
Published: May 2, 2024 License: Apache-2.0 Imports: 40 Imported by: 0

Documentation

Index

Constants

View Source
const (
	VERSION = "icq/v0.11.0"
)

Variables

View Source
var (
	MaxTxMsgs             int
	WaitInterval          = time.Second * 6
	HistoricQueryInterval = time.Second * 15
	TxMsgs                = MaxTxMsgs

	LastReduced time.Time

	// Variables used for retries
	RtyAttNum = uint(5)
	RtyAtt    = retry.Attempts(RtyAttNum)
	RtyDel    = retry.Delay(time.Millisecond * 400)
	RtyErr    = retry.LastErrorOnly(true)
)

Functions

func Close

func Close() error

func FlushSendQueue

func FlushSendQueue(chainId string, logger log.Logger, metrics prommetrics.Metrics) error

func Run

func Run(cfg *config.Config, home string) error

func RunGRPCQuery

func RunGRPCQuery(ctx context.Context, client *lensclient.ChainClient, method string, reqBz []byte, md metadata.MD, metrics prommetrics.Metrics) (abcitypes.ResponseQuery, metadata.MD, error)

func Tx

func Tx(client *lensclient.ChainClient, hash []byte) (tmtypes.TxProof, int64, error)

tm0.37 has a breaking change whereby tx events are no longer base64 encoded, so are represented as string and not bytes. As a result, we cannot use the RPCClient.Tx() method which attempts to unmarshal the Result, including the underlying Tx object. As such, we want to query the result directly, and unmarshal the json ourselves, to a representation of the result that conveniently does not contain the Tx object (that we don't use, because the TxProof already contains a byte representation of tx anyway!) Note: this function is compatible with 0.34 and 0.37 representations of transactions.

Types

type Clients

type Clients []*lensclient.ChainClient

func (Clients) GetForChainId

func (clients Clients) GetForChainId(chainId string) *lensclient.ChainClient

type Query

type Query struct {
	SourceChainId string
	ConnectionId  string
	ChainId       string
	QueryId       string
	Type          string
	Height        int64
	Request       []byte
}

type TxResultMinimal

type TxResultMinimal struct {
	Height string          `json:"height"`
	Proof  tmtypes.TxProof `json:"proof"`
}

a minimised representation of the Tx emitted by a Tx query, only containing Height and Proof and thus compatbiel with tm0.34 and tm0.37.

Jump to

Keyboard shortcuts

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