pruner

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2024 License: LGPL-3.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Archive pruner mode.
	Archive = Mode("archive")
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ArchiveNode

type ArchiveNode struct{}

ArchiveNode is a no-op since we don't prune nodes in archive mode.

func (*ArchiveNode) StoreJournalRecord

func (*ArchiveNode) StoreJournalRecord(_, _ map[common.Hash]struct{},
	_ common.Hash, _ int64) error

StoreJournalRecord for archive node doesn't do anything.

type Config

type Config struct {
	Mode           Mode
	RetainedBlocks uint32
}

Config holds state trie pruning mode and retained blocks

type Mode

type Mode string

Mode online pruning mode of historical state tries

func (Mode) IsValid

func (p Mode) IsValid() bool

IsValid checks whether the pruning mode is valid

type Pruner

type Pruner interface {
	StoreJournalRecord(deletedNodeHashes, insertedNodeHashes map[common.Hash]struct{},
		blockHash common.Hash, blockNum int64) error
}

Pruner is implemented by FullNode and ArchiveNode.

Jump to

Keyboard shortcuts

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