fileledger

package
v0.0.0-...-523a819 Latest Latest
Warning

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

Go to latest
Published: Jan 21, 2019 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(directory string) blockledger.Factory

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

height返回分类帐上的块数

func (*FileLedger) Iterator

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

Iterator returns an Iterator, as specified by an ab.SeekInfo message, and its 起始块编号

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