chainsync

package
v1.2.4 Latest Latest
Warning

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

Go to latest
Published: May 10, 2022 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
}

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,
	cs syncer.ChainSelector,
	bsstore blockstore.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
Package exchange contains the ChainExchange server and client components.
Package exchange contains the ChainExchange server and client components.

Jump to

Keyboard shortcuts

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