fileledger

package
v0.0.0-...-95b87ed Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2019 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(directory string, metricsProvider metrics.Provider) (blockledger.Factory, error)

Types

type FileLedger

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

func NewFileLedger

func NewFileLedger(blockStore FileLedgerBlockStore) *FileLedger

func (*FileLedger) Append

func (fl *FileLedger) Append(block *cb.Block) error

func (*FileLedger) Height

func (fl *FileLedger) Height() uint64

func (*FileLedger) Iterator

func (fl *FileLedger) Iterator(startPosition *ab.SeekPosition) (blockledger.Iterator, uint64)

type FileLedgerBlockStore

type FileLedgerBlockStore interface {
	AddBlock(block *cb.Block) error
	GetBlockchainInfo() (*cb.BlockchainInfo, error)
	RetrieveBlocks(startBlockNumber uint64) (ledger.ResultsIterator, error)
}

Jump to

Keyboard shortcuts

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