ledgerstorage

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoadPreResetHeight

func LoadPreResetHeight(blockstorePath string) (map[string]uint64, error)

func ResetBlockStore

func ResetBlockStore(blockstorePath string) error

func Rollback

func Rollback(blockstorePath, ledgerID string, blockNum uint64) error

func ValidateRollbackParams

func ValidateRollbackParams(blockstorePath, ledgerID string, blockNum uint64) error

Types

type Provider

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

func NewProvider

func NewProvider(blockStoreDir string, conf *pvtdatastorage.PrivateDataConfig, metricsProvider metrics.Provider) (*Provider, error)

func (*Provider) Close

func (p *Provider) Close()

func (*Provider) Exists

func (p *Provider) Exists(ledgerID string) (bool, error)

func (*Provider) Open

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

type Store

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

func (*Store) CommitPvtDataOfOldBlocks

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

func (*Store) CommitWithPvtData

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

func (*Store) DoesPvtDataInfoExist

func (s *Store) DoesPvtDataInfoExist(blockNum uint64) (bool, error)

func (*Store) GetLastUpdatedOldBlocksPvtData

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

func (*Store) GetMissingPvtDataInfoForMostRecentBlocks

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

func (*Store) GetPvtDataAndBlockByNum

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

func (*Store) GetPvtDataByNum

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

func (*Store) Init

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

func (*Store) IsPvtStoreAheadOfBlockStore

func (s *Store) IsPvtStoreAheadOfBlockStore() bool

func (*Store) ProcessCollsEligibilityEnabled

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

func (*Store) ResetLastUpdatedOldBlocksList

func (s *Store) ResetLastUpdatedOldBlocksList() error

Jump to

Keyboard shortcuts

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