safedb

package
v0.0.0-...-70e280b Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2024 License: MIT, MIT Imports: 10 Imported by: 0

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