fsblkstorage

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

Documentation

Index

Constants

View Source
const (
	ChainsDir = "chains"

	IndexDir = "index"
)

Variables

View Source
var ErrUnexpectedEndOfBlockfile = errors.New("unexpected end of blockfile")

Functions

func ClearPreResetHeight

func ClearPreResetHeight(blockStorageDir string) error

func LoadPreResetHeight

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

func NewProvider

func NewProvider(conf *Conf, indexConfig *blkstorage.IndexConfig, metricsProvider metrics.Provider) (blkstorage.BlockStoreProvider, error)

func ResetBlockStore

func ResetBlockStore(blockStorageDir string) error

func Rollback

func Rollback(blockStorageDir, ledgerID string, targetBlockNum uint64, indexConfig *blkstorage.IndexConfig) error

func ValidateRollbackParams

func ValidateRollbackParams(blockStorageDir, ledgerID string, targetBlockNum uint64) error

Types

type Conf

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

func NewConf

func NewConf(blockStorageDir string, maxBlockfileSize int) *Conf

type FsBlockstoreProvider

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

func (*FsBlockstoreProvider) Close

func (p *FsBlockstoreProvider) Close()

func (*FsBlockstoreProvider) CreateBlockStore

func (p *FsBlockstoreProvider) CreateBlockStore(ledgerid string) (blkstorage.BlockStore, error)

func (*FsBlockstoreProvider) Exists

func (p *FsBlockstoreProvider) Exists(ledgerid string) (bool, error)

func (*FsBlockstoreProvider) List

func (p *FsBlockstoreProvider) List() ([]string, error)

func (*FsBlockstoreProvider) OpenBlockStore

func (p *FsBlockstoreProvider) OpenBlockStore(ledgerid string) (blkstorage.BlockStore, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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