synchronizer

package
v0.0.0-...-d2aac13 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run(ctx context.Context, opts *cli.IndexerOptions, client *starknet.FeederGatewayClient, storage storage.Storage)

Types

type BlockDatasource

type BlockDatasource interface {
	Start(context.Context)
	SyncBlock(context.Context, uint64) error
}

type FeederGateway

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

func NewFeederGatewaySynchronizer

func NewFeederGatewaySynchronizer(client *starknet.FeederGatewayClient, storage storage.Storage) *FeederGateway

func (*FeederGateway) Start

func (g *FeederGateway) Start(ctx context.Context)

func (*FeederGateway) SyncBlock

func (g *FeederGateway) SyncBlock(ctx context.Context, block uint64) error

type FullNode

type FullNode struct{}

func (*FullNode) Start

func (n *FullNode) Start(ctx context.Context)

func (*FullNode) SyncBlock

func (n *FullNode) SyncBlock(ctx context.Context, block uint64) error

type Synchronizer

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

func NewSynchronizer

func NewSynchronizer(client *starknet.FeederGatewayClient, storage storage.Storage) *Synchronizer

func (*Synchronizer) FetchBlock

func (s *Synchronizer) FetchBlock(blockNumber uint64) (*starknet.GetBlockResponse, error)

func (*Synchronizer) Start

func (s *Synchronizer) Start(ctx context.Context)

func (*Synchronizer) SyncBlock

func (s *Synchronizer) SyncBlock(ctx context.Context, block *starknet.GetBlockResponse)

Jump to

Keyboard shortcuts

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