sync

package
v0.6.6 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2023 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Reader added in v0.6.2

type Reader interface {
	StartingBlockNumber() (uint64, error)
	HighestBlockHeader() *core.Header
}

type Synchronizer

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

Synchronizer manages a list of StarknetData to fetch the latest blockchain updates

func New added in v0.2.1

func New(bc *blockchain.Blockchain, starkNetData starknetdata.StarknetData,
	log utils.SimpleLogger, pendingPollInterval time.Duration,
) *Synchronizer

func (*Synchronizer) HighestBlockHeader added in v0.3.0

func (s *Synchronizer) HighestBlockHeader() *core.Header

func (*Synchronizer) Run

func (s *Synchronizer) Run(ctx context.Context) error

Run starts the Synchronizer, returns an error if the loop is already running

func (*Synchronizer) StartingBlockNumber added in v0.3.0

func (s *Synchronizer) StartingBlockNumber() (uint64, error)

Jump to

Keyboard shortcuts

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