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 ¶
PermanentDatabaseSize returns the size of the underlying permanent database and files.
func (*Storage) PrunableDatabaseSize ¶
PrunableDatabaseSize returns the size of the underlying prunable databases.
func (*Storage) PruneUntilSlot ¶
PruneUntilSlot prunes storage slots less than and equal to the given index.
Click to show internal directories.
Click to hide internal directories.