store

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jan 27, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const RecordSize = 116 // 8 + 8 + 4 + 32 + 32 + 32

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

func (*DB) Close

func (db *DB) Close() error

func (*DB) Count

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

func (*DB) Get

func (db *DB) Get(index uint64) (Record, error)

func (*DB) PersistRecords

func (db *DB) PersistRecords(validRecords []Record) error

func (*DB) SaveLog

func (db *DB) SaveLog(recordsCh <-chan []Record, blockNumber uint64, errCh chan<- error)

type Record

type Record struct {
	BlockNumber uint64
	BlockTime   uint64
	LogIndex    uint32
	TxHash      [common.HashLength]byte
	ParentHash  [common.HashLength]byte
	InfoRoot    [common.HashLength]byte
}

func DeserializeRecord

func DeserializeRecord(data []byte) (Record, error)

func RecordFromLog

func RecordFromLog(log types.Log, header *types.Header) Record

func (*Record) Serialize

func (r *Record) Serialize() []byte

Jump to

Keyboard shortcuts

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