chainsentry

package
v0.6.0-RC2 Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2023 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrorFailedToFetchLatestBlock = sdkerrors.New("Error FailedToFetchLatestBlock", 1001, "Failed to fetch latest block from node")

Functions

This section is empty.

Types

type ChainSentry

type ChainSentry struct {
	ChainID string
	// contains filtered or unexported fields
}

func NewChainSentry

func NewChainSentry(
	clientCtx client.Context,
	cp chainproxy.ChainProxy,
	chainID string,
) *ChainSentry

func (*ChainSentry) GetLatestBlockData

func (cs *ChainSentry) GetLatestBlockData(requestedBlock int64) (latestBlock int64, hashesRes map[int64]interface{}, requestedBlockHash string, err error)

func (*ChainSentry) GetLatestBlockHash

func (cs *ChainSentry) GetLatestBlockHash() string

func (*ChainSentry) GetLatestBlockNum

func (cs *ChainSentry) GetLatestBlockNum() int64

func (*ChainSentry) Init

func (cs *ChainSentry) Init(ctx context.Context) error

func (*ChainSentry) SetLatestBlockNum

func (cs *ChainSentry) SetLatestBlockNum(value int64)

func (*ChainSentry) Start

func (cs *ChainSentry) Start(ctx context.Context) error

Jump to

Keyboard shortcuts

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