localdb

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DB

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

func New

func New(db *pebble.DB) *DB

func (*DB) AppendBlock

func (db *DB) AppendBlock(block *monomer.Block) error

AppendBlock does no validity checks and does not update labels.

func (*DB) BlockByHash

func (db *DB) BlockByHash(hash common.Hash) (*monomer.Block, error)

func (*DB) BlockByHeight

func (db *DB) BlockByHeight(height uint64) (*monomer.Block, error)

func (*DB) BlockByLabel

func (db *DB) BlockByLabel(label eth.BlockLabel) (*monomer.Block, error)

func (*DB) HeadBlock

func (db *DB) HeadBlock() (*monomer.Block, error)

func (*DB) HeadHeader

func (db *DB) HeadHeader() (*monomer.Header, error)

func (*DB) HeaderByHash

func (db *DB) HeaderByHash(hash common.Hash) (*monomer.Header, error)

func (*DB) HeaderByHeight

func (db *DB) HeaderByHeight(height uint64) (*monomer.Header, error)

func (*DB) HeaderByLabel

func (db *DB) HeaderByLabel(label eth.BlockLabel) (*monomer.Header, error)

func (*DB) Height

func (db *DB) Height() (uint64, error)

func (*DB) Rollback

func (db *DB) Rollback(unsafe, safe, finalized common.Hash) error

Rollback rolls back the chain and updates labels.

func (*DB) UpdateLabels

func (db *DB) UpdateLabels(unsafe, safe, finalized common.Hash) error

Jump to

Keyboard shortcuts

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