chainsync

package
v1.15.2 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BlockProposer

type BlockProposer interface {
	SetConcurrent(number int64)
	Concurrent() int64
	SyncTracker() *types.TargetTracker
	SendHello(ci *types2.ChainInfo) error
	SendOwnBlock(ci *types2.ChainInfo) error
	SendGossipBlock(ci *types2.ChainInfo) error
	IncomingBlocks(ctx context.Context) (<-chan *types2.BlockHeader, error)
}

BlockProposer allows callers to propose new blocks for inclusion in the chain.

type Manager

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

Manager sync the chain.

func NewManager

func NewManager(
	stmgr *statemanger.Stmgr,
	hv *consensus.BlockValidator,
	submodule *chain2.ChainSubmodule,
	bsstore blockstoreutil.Blockstore,
	exchangeClient exchange.Client,
	c clock.Clock,
	fork fork.IFork,
) (Manager, error)

NewManager creates a new chain sync manager.

func (*Manager) BlockProposer

func (m *Manager) BlockProposer() BlockProposer

BlockProposer returns the block proposer.

func (*Manager) Start

func (m *Manager) Start(ctx context.Context) error

Start starts the chain sync manager.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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