storage

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2023 License: Apache-2.0, BSD-2-Clause Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Storage

type Storage struct {
	// Permanent is the section of the storage that is maintained forever (holds the current ledger state).
	*permanent.Permanent

	// Prunable is the section of the storage that is pruned regularly (holds the history of the ledger state).
	*prunable.Prunable

	Directory string
	// contains filtered or unexported fields
}

Storage is an abstraction around the storage layer of the node.

func New

func New(directory string, version database.Version, opts ...options.Option[database.Manager]) (newStorage *Storage)

New creates a new storage instance with the named database version in the given directory.

func (*Storage) PermanentDatabaseSize

func (s *Storage) PermanentDatabaseSize() int64

PermanentDatabaseSize returns the size of the underlying permanent database and files.

func (*Storage) PrunableDatabaseSize

func (s *Storage) PrunableDatabaseSize() int64

PrunableDatabaseSize returns the size of the underlying prunable databases.

func (*Storage) PruneUntilSlot

func (s *Storage) PruneUntilSlot(index slot.Index)

PruneUntilSlot prunes storage slots less than and equal to the given index.

func (*Storage) Shutdown

func (s *Storage) Shutdown()

Shutdown shuts down the storage.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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