cdbblkstorage

package
v0.1.6 Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2021 License: Apache-2.0 Imports: 31 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ClearPreResetHeight added in v0.1.4

func ClearPreResetHeight(couchInstance *couchdb.CouchInstance, ledgerIDs []string) error

ClearPreResetHeight deletes the files that contain the last recorded reset heights for the specified ledgers

func LoadPreResetHeight added in v0.1.4

func LoadPreResetHeight(couchInstance *couchdb.CouchInstance, ledgerIDs []string) (map[string]uint64, error)

LoadPreResetHeight searches the preResetHeight files for the specified ledgers and returns a map of channelname to the last recorded block height during one of the reset operations.

func NewProvider

func NewProvider(indexConfig *blkstorage.IndexConfig, ledgerconfig *ledger.Config) (api.BlockStoreProvider, error)

NewProvider creates a new CouchDB BlockStoreProvider

func ResetBlockStore added in v0.1.4

func ResetBlockStore(couchInstance *couchdb.CouchInstance) error

ResetBlockStore drops the block storage index and truncates the blocks files for all channels/ledgers to genesis blocks

func Rollback added in v0.1.4

func Rollback(couchInstance *couchdb.CouchInstance, internalQueryLimit int, ledgerID string, targetBlockNum uint64) error

Rollback reverts changes made to the block store beyond a given block number.

func ValidateRollbackParams added in v0.1.4

func ValidateRollbackParams(couchInstance *couchdb.CouchInstance, ledgerID string, targetBlockNum uint64) error

ValidateRollbackParams performs necessary validation on the input given for the rollback operation.

Types

type CDBBlockstoreProvider

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

CDBBlockstoreProvider provides block storage in CouchDB

func (*CDBBlockstoreProvider) Close

func (p *CDBBlockstoreProvider) Close()

Close cleans up the Provider

func (*CDBBlockstoreProvider) Open added in v0.1.4

func (p *CDBBlockstoreProvider) Open(ledgerid string) (api.BlockStore, error)

Open opens the block store for the given ledger ID

Directories

Path Synopsis
Code generated by counterfeiter.
Code generated by counterfeiter.

Jump to

Keyboard shortcuts

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