tracking

package
v0.0.0-...-fbce341 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2022 License: AGPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Block

type Block struct {
	Number          *big.Int
	BlockHash       string
	ParentHash      string
	Difficulty      *big.Int
	TotalDifficulty *big.Int
	ClientIds       btree.Set[string]
}

func (Block) String

func (b Block) String() string

type BlocksForNumber

type BlocksForNumber struct {
	Number *big.Int
	Blocks []*Block
}

type CanonicalChain

type CanonicalChain struct {
	NetworkId uint64
	ChainId   uint64
	// contains filtered or unexported fields
}

func NewCanonicalChain

func NewCanonicalChain(
	networkId uint64,
	chainId uint64,
	updates <-chan natsutil.KeyValueEntry[eth.ClientStatus],
	maxDistanceFromHead int,
) (*CanonicalChain, error)

func (*CanonicalChain) AddListener

func (cc *CanonicalChain) AddListener(ch chan<- *CanonicalChain)

func (*CanonicalChain) BlockByHash

func (cc *CanonicalChain) BlockByHash(hash string) (*Block, bool)

func (*CanonicalChain) Close

func (cc *CanonicalChain) Close()

func (*CanonicalChain) Head

func (cc *CanonicalChain) Head() *Block

func (*CanonicalChain) Start

func (cc *CanonicalChain) Start()

func (*CanonicalChain) String

func (cc *CanonicalChain) String() string

Jump to

Keyboard shortcuts

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