ledgerstorage

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: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Provider

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

提供程序封装两个提供程序1)块存储提供程序和2)和pvt数据存储提供程序

func NewProvider

func NewProvider() *Provider

NewProvider将句柄返回给提供程序

func (*Provider) Close

func (p *Provider) Close()

关闭关闭提供程序

func (*Provider) Open

func (p *Provider) Open(ledgerid string) (*Store, error)

打开打开打开商店

type Store

type Store struct {
	blkstorage.BlockStore
	// contains filtered or unexported fields
}

存储封装了两个存储1)块存储和pvt数据存储

func (*Store) CommitPvtDataOfOldBlocks

func (s *Store) CommitPvtDataOfOldBlocks(blocksPvtData map[uint64][]*ledger.TxPvtData) error

commitpvtdataofoldblocks提交旧块的pvtdata

func (*Store) CommitWithPvtData

func (s *Store) CommitWithPvtData(blockAndPvtdata *ledger.BlockAndPvtData) error

commitWithpvtData在原子操作中提交块和相应的pvt数据

func (*Store) GetLastUpdatedOldBlocksPvtData

func (s *Store) GetLastUpdatedOldBlocksPvtData() (map[uint64][]*ledger.TxPvtData, error)

GetLastUpdatedDoldBlockspvtData调用底层pvtData存储上的函数

func (*Store) GetMissingPvtDataInfoForMostRecentBlocks

func (s *Store) GetMissingPvtDataInfoForMostRecentBlocks(maxBlock int) (ledger.MissingPvtDataInfo, error)

GetMissingPvtDataInfoFormsToRecentBlocks调用底层PvTData存储上的函数

func (*Store) GetPvtDataAndBlockByNum

func (s *Store) GetPvtDataAndBlockByNum(blockNum uint64, filter ledger.PvtNsCollFilter) (*ledger.BlockAndPvtData, error)

getpvtdataandblockbynum返回块和相应的pvt数据。 pvt数据由提供的“集合”列表筛选

func (*Store) GetPvtDataByNum

func (s *Store) GetPvtDataByNum(blockNum uint64, filter ledger.PvtNsCollFilter) ([]*ledger.TxPvtData, error)

getpvtdatabynum仅返回与给定块号对应的pvt数据 The pvt data is filtered by the list of 'ns/collections' supplied in the filter nil筛选器不筛选任何结果

func (*Store) Init

func (s *Store) Init(btlPolicy pvtdatapolicy.BTLPolicy)

init用基本配置初始化存储

func (*Store) ProcessCollsEligibilityEnabled

func (s *Store) ProcessCollsEligibilityEnabled(committingBlk uint64, nsCollMap map[string][]string) error

processcollseligibilityEnabled调用底层pvtdata存储上的函数

func (*Store) ResetLastUpdatedOldBlocksList

func (s *Store) ResetLastUpdatedOldBlocksList() error

resetlastupdatedodldblockslist调用底层pvtdata存储上的函数

Jump to

Keyboard shortcuts

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