chainsync

package
v1.2.4 Latest Latest
Warning

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

Go to latest
Published: Dec 8, 2020 License: MIT Imports: 5 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ResolveBase

func ResolveBase(ctx context.Context, api *apistruct.FullNodeStruct, left *types.TipSetKey, right types.TipSetKey) (*types.TipSetKey, []*types.TipSet, error)

ResolveBase returns the base TipSetKey that both left and right TipSetKey share, plus a Revert/Apply set of operations to get from last to new.

Types

type ChainSync

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

ChainSync provides methods to resolve chain syncing situations.

func New

func New(clientBuilder lotus.ClientBuilder) *ChainSync

New returns a new ChainSync.

func (*ChainSync) Precedes

func (cs *ChainSync) Precedes(ctx context.Context, from, to types.TipSetKey) (bool, error)

Precedes returns true if from and to don't live in different chain forks, and from is at a lower epoch than to.

Jump to

Keyboard shortcuts

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