chain

package
v0.9.7-rc3 Latest Latest
Warning

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

Go to latest
Published: Jun 19, 2021 License: Apache-2.0, MIT Imports: 38 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewAPIBlockstore

func NewAPIBlockstore(cio ChainIO) blockstore.Blockstore

func NewAccountAPI

func NewAccountAPI(chain *ChainSubmodule) apiface.IAccount

func NewActorAPI

func NewActorAPI(chain *ChainSubmodule) apiface.IActor

func NewBeaconAPI

func NewBeaconAPI(chain *ChainSubmodule) apiface.IBeacon

func NewChainInfoAPI

func NewChainInfoAPI(chain *ChainSubmodule) apiface.IChainInfo

func NewMinerStateAPI

func NewMinerStateAPI(chain *ChainSubmodule) apiface.IMinerState

Types

type ChainIO

type ChainIO interface {
	ChainReadObj(context.Context, cid.Cid) ([]byte, error)
	ChainHasObj(context.Context, cid.Cid) (bool, error)
}

type ChainSubmodule

type ChainSubmodule struct {
	ChainReader    *chain.Store
	MessageStore   *chain.MessageStore
	Sampler        *chain.Sampler
	Processor      *consensus.DefaultProcessor
	StatusReporter *chain.StatusReporter

	Fork fork.IFork

	CheckPoint types.TipSetKey
	Drand      beacon.Schedule

	// Wait for confirm message
	Waiter *chain.Waiter
	// contains filtered or unexported fields
}

ChainSubmodule enhances the `Node` with chain capabilities.

func NewChainSubmodule

func NewChainSubmodule(ctx context.Context,
	config chainConfig,
	repo chainRepo,
	blockstore *blockstore.BlockstoreSubmodule,
	verifier ffiwrapper.Verifier,
) (*ChainSubmodule, error)

NewChainSubmodule creates a new chain submodule.

func (*ChainSubmodule) API

func (chain *ChainSubmodule) API() apiface.IChain

func (*ChainSubmodule) Start

func (chain *ChainSubmodule) Start(ctx context.Context) error

Start loads the chain from disk.

func (*ChainSubmodule) Stop

func (chain *ChainSubmodule) Stop(ctx context.Context)

func (*ChainSubmodule) V0API added in v0.9.7

func (chain *ChainSubmodule) V0API() v0api.IChain

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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