pruning

package
v1.1.2 Latest Latest
Warning

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

Go to latest
Published: Jan 28, 2022 License: CC0-1.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RunAdditionalOperations

func RunAdditionalOperations(cfg *Config) error

RunAdditionalOperations runs the additional operations for the pruning module

Types

type Config

type Config struct {
	KeepRecent int64 `yaml:"keep_recent"`
	KeepEvery  int64 `yaml:"keep_every"`
	Interval   int64 `yaml:"interval"`
}

func NewConfig

func NewConfig(keepRecent, keepEvery, interval int64) *Config

NewConfig allows to build a new Config instance

func ParseConfig

func ParseConfig(bz []byte) (*Config, error)

type Module

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

Module represents the pruning module allowing to clean the database periodically

func NewModule

func NewModule(cfg config.Config, db database.Database, logger logging.Logger) *Module

NewModule builds a new Module instance

func (*Module) HandleBlock

func (m *Module) HandleBlock(
	block *tmctypes.ResultBlock, _ *tmctypes.ResultBlockResults, _ []*types.Tx, _ *tmctypes.ResultValidators,
) error

HandleBlock implements modules.BlockModule

func (*Module) Name

func (m *Module) Name() string

Name implements modules.Module

func (*Module) RunAdditionalOperations

func (m *Module) RunAdditionalOperations() error

RunAdditionalOperations implements

Jump to

Keyboard shortcuts

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