lib

package
v0.0.0-...-db2620f Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2020 License: Apache-2.0, MIT Imports: 31 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExportSectors

func ExportSectors(ctx context.Context, store adt.Store, actorsIn *states.Tree) (chan *SectorInfo, error)

ExportSectors returns a channel iterating over all sector infos in miner actor state

func PrintHAMTSizes

func PrintHAMTSizes(ctx context.Context, store cbornode.IpldStore, tree *states2.Tree) error

func V0TreeMinerBalances

func V0TreeMinerBalances(ctx context.Context, store cbornode.IpldStore, stateRootIn cid.Cid) (map[address.Address]BalanceInfo, error)

V0TreeMinerBalancse returns a map of every miner's balance info at the provided state tree. It is used for displaying and validating miner info.

Types

type BalanceInfo

type BalanceInfo struct {
	Balance           abi.TokenAmount
	LockedFunds       abi.TokenAmount
	InitialPledge     abi.TokenAmount
	PreCommitDeposits abi.TokenAmount
}

type BufferedBlockstore

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

BufferedBlockstore pushes all writes to an in memory cache blockstore and reads through this cache into a slower lotus blockstore backed by an on disk repo. It has an extra method for flushing data from the in memory blockstore to a third on disk badger datastore backed blockstore.

func NewBufferedBlockstore

func NewBufferedBlockstore(readLotusPath, writeEntPath string) (*BufferedBlockstore, error)

func (*BufferedBlockstore) AllKeysChan

func (rb *BufferedBlockstore) AllKeysChan(ctx context.Context) (<-chan cid.Cid, error)

func (*BufferedBlockstore) DeleteBlock

func (rb *BufferedBlockstore) DeleteBlock(c cid.Cid) error

func (*BufferedBlockstore) FlushFromBuffer

func (rb *BufferedBlockstore) FlushFromBuffer(ctx context.Context, c cid.Cid) error

func (*BufferedBlockstore) Get

func (rb *BufferedBlockstore) Get(c cid.Cid) (blocks.Block, error)

func (*BufferedBlockstore) GetSize

func (rb *BufferedBlockstore) GetSize(c cid.Cid) (int, error)

func (*BufferedBlockstore) Has

func (rb *BufferedBlockstore) Has(c cid.Cid) (bool, error)

func (*BufferedBlockstore) HashOnRead

func (rb *BufferedBlockstore) HashOnRead(enabled bool)

func (*BufferedBlockstore) LoadToReadOnlyBuffer

func (rb *BufferedBlockstore) LoadToReadOnlyBuffer(ctx context.Context, c cid.Cid) error

func (*BufferedBlockstore) Put

func (rb *BufferedBlockstore) Put(b blocks.Block) error

func (*BufferedBlockstore) PutMany

func (rb *BufferedBlockstore) PutMany(bs []blocks.Block) error

type Chain

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

func (*Chain) FlushBufferedState

func (c *Chain) FlushBufferedState(ctx context.Context, stateRoot cid.Cid) error

func (*Chain) LoadCborStore

func (c *Chain) LoadCborStore(ctx context.Context) (cbornode.IpldStore, error)

LoadCborStore loads the ~/.lotus chain datastore for chain traversal and state loading

func (*Chain) LoadToReadOnlyBuffer

func (c *Chain) LoadToReadOnlyBuffer(ctx context.Context, stateRoot cid.Cid) error

func (*Chain) NewChainStateIterator

func (c *Chain) NewChainStateIterator(ctx context.Context, tipCid cid.Cid) (*ChainStateIterator, error)

type ChainStateIterator

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

ChainStateIterator moves from tip to genesis emiting parent state roots of blocks

func (*ChainStateIterator) Done

func (it *ChainStateIterator) Done() bool

func (*ChainStateIterator) Step

func (it *ChainStateIterator) Step(ctx context.Context) error

Moves iterator backwards towards genesis. Noop at genesis

func (*ChainStateIterator) Val

func (it *ChainStateIterator) Val() IterVal

Return the parent state root and parent height of the current block

type IterVal

type IterVal struct {
	Height int64
	State  cid.Cid
}

type SectorInfo

type SectorInfo struct {
	Sector *miner.SectorOnChainInfo
	Status string
}

Jump to

Keyboard shortcuts

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