safedb

package
v1.12.2 Latest Latest
Warning

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

Go to latest
Published: Mar 18, 2025 License: MIT, MIT Imports: 10 Imported by: 2 modules, 2 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Disabled      = &DisabledDB{}
	ErrNotEnabled = errors.New("safe head database not enabled")
)
View Source
var (
	ErrNotFound     = errors.New("not found")
	ErrInvalidEntry = errors.New("invalid db entry")
)

Functions

This section is empty.

Types

type DisabledDB

type DisabledDB struct{}

func (*DisabledDB) Close

func (d *DisabledDB) Close() error

func (*DisabledDB) Enabled

func (d *DisabledDB) Enabled() bool

func (*DisabledDB) SafeHeadAtL1

func (d *DisabledDB) SafeHeadAtL1(_ context.Context, _ uint64) (l1 eth.BlockID, safeHead eth.BlockID, err error)

func (*DisabledDB) SafeHeadReset

func (d *DisabledDB) SafeHeadReset(_ eth.L2BlockRef) error

func (*DisabledDB) SafeHeadUpdated

func (d *DisabledDB) SafeHeadUpdated(_ eth.L2BlockRef, _ eth.BlockID) error

type SafeDB

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

func NewSafeDB

func NewSafeDB(logger log.Logger, path string) (*SafeDB, error)

func (*SafeDB) Close

func (d *SafeDB) Close() error

func (*SafeDB) Enabled

func (d *SafeDB) Enabled() bool

func (*SafeDB) SafeHeadAtL1

func (d *SafeDB) SafeHeadAtL1(ctx context.Context, l1BlockNum uint64) (l1Block eth.BlockID, safeHead eth.BlockID, err error)

func (*SafeDB) SafeHeadReset

func (d *SafeDB) SafeHeadReset(safeHead eth.L2BlockRef) error

func (*SafeDB) SafeHeadUpdated

func (d *SafeDB) SafeHeadUpdated(safeHead eth.L2BlockRef, l1Head eth.BlockID) error

Jump to

Keyboard shortcuts

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