blockdb

package
v1.19.8 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2025 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitWithPebble

func InitWithPebble(config dtypes.PebbleBlockDBConfig) error

func InitWithS3

func InitWithS3(config dtypes.S3BlockDBConfig) error

Types

type BlockDb

type BlockDb struct {
	// contains filtered or unexported fields
}
var GlobalBlockDb *BlockDb

func (*BlockDb) AddBlock

func (db *BlockDb) AddBlock(ctx context.Context, slot uint64, root []byte, header_ver uint64, header_data []byte, body_ver uint64, body_data []byte) (bool, error)

func (*BlockDb) AddBlockWithCallback

func (db *BlockDb) AddBlockWithCallback(ctx context.Context, slot uint64, root []byte, dataCb func() (*types.BlockData, error)) (bool, error)

func (*BlockDb) Close

func (db *BlockDb) Close() error

func (*BlockDb) GetBlock

func (db *BlockDb) GetBlock(ctx context.Context, slot uint64, root []byte, parseBlock func(uint64, []byte) (interface{}, error)) (*types.BlockData, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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