ibd

package
v0.7.0-rc1 Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2020 License: ISC Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HandleIBD

func HandleIBD(context HandleIBDContext, incomingRoute *router.Route, outgoingRoute *router.Route,
	peer *peerpkg.Peer) error

HandleIBD waits for IBD start and handles it when IBD is triggered for this peer

func HandleRequestBlockLocator

func HandleRequestBlockLocator(context RequestBlockLocatorContext, incomingRoute *router.Route,
	outgoingRoute *router.Route) error

HandleRequestBlockLocator handles getBlockLocator messages

func HandleRequestIBDBlocks

func HandleRequestIBDBlocks(context RequestIBDBlocksContext, incomingRoute *router.Route, outgoingRoute *router.Route) error

HandleRequestIBDBlocks handles getBlocks messages

Types

type HandleIBDContext

type HandleIBDContext interface {
	DAG() *blockdag.BlockDAG
	OnNewBlock(block *util.Block) error
	StartIBDIfRequired()
	FinishIBD()
}

HandleIBDContext is the interface for the context needed for the HandleIBD flow.

type RequestBlockLocatorContext

type RequestBlockLocatorContext interface {
	DAG() *blockdag.BlockDAG
}

RequestBlockLocatorContext is the interface for the context needed for the HandleRequestBlockLocator flow.

type RequestIBDBlocksContext

type RequestIBDBlocksContext interface {
	DAG() *blockdag.BlockDAG
}

RequestIBDBlocksContext is the interface for the context needed for the HandleRequestIBDBlocks flow.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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