trusted_headers

package
v0.0.0-...-ad19e34 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	RtyAttNum = uint(5)
	RtyAtt    = retry.Attempts(RtyAttNum)
	RtyDel    = retry.Delay(time.Millisecond * 400)
	RtyErr    = retry.LastErrorOnly(true)
)

retries configuration for fetching light header

Functions

This section is empty.

Types

type TrustedHeaderFetcher

type TrustedHeaderFetcher struct {
	// contains filtered or unexported fields
}

TrustedHeaderFetcher able to get trusted headers for a given height Trusted headers are needed in Neutron along with proofs to verify that transactions are: - included in the block (inclusion proof) - successfully executed (delivery proof)

func NewTrustedHeaderFetcher

func NewTrustedHeaderFetcher(neutronChain *relayer.Chain, targetChain *relayer.Chain, logger *zap.Logger) *TrustedHeaderFetcher

NewTrustedHeaderFetcher constructs a new TrustedHeaderFetcher

func (*TrustedHeaderFetcher) Fetch

func (thf *TrustedHeaderFetcher) Fetch(ctx context.Context, height uint64) (header *tmclient.Header, err error)

FetchTrustedHeaderForHeight returns the best suitable TrustedHeader for given height Arguments: `height` - remote chain block height X = transaction with such block height

Jump to

Keyboard shortcuts

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