chainsync

package
v1.2.6 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2020 License: MIT Imports: 5 Imported by: 0

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