Versions in this module Expand all Collapse all v1 v1.10.0 Nov 19, 2024 v1.9.5 Nov 8, 2024 Changes in this version + const EntrySize + type ChainMetrics interface + RecordDBEntryCount func(kind string, count int64) + type DB struct + func NewFromEntryStore(logger log.Logger, m Metrics, store EntryStore) (*DB, error) + func NewFromFile(logger log.Logger, m Metrics, path string) (*DB, error) + func (db *DB) AddDerived(derivedFrom eth.BlockRef, derived eth.BlockRef) error + func (db *DB) Close() error + func (db *DB) DerivedFrom(derived eth.BlockID) (derivedFrom types.BlockSeal, err error) + func (db *DB) First() (derivedFrom types.BlockSeal, derived types.BlockSeal, err error) + func (db *DB) FirstAfter(derivedFrom, derived eth.BlockID) (nextDerivedFrom, nextDerived types.BlockSeal, err error) + func (db *DB) LastDerivedAt(derivedFrom eth.BlockID) (derived types.BlockSeal, err error) + func (db *DB) Latest() (derivedFrom types.BlockSeal, derived types.BlockSeal, err error) + func (db *DB) NextDerived(derived eth.BlockID) (derivedFrom types.BlockSeal, nextDerived types.BlockSeal, err error) + func (db *DB) NextDerivedFrom(derivedFrom eth.BlockID) (nextDerivedFrom types.BlockSeal, err error) + func (db *DB) PreviousDerived(derived eth.BlockID) (prevDerived types.BlockSeal, err error) + func (db *DB) PreviousDerivedFrom(derivedFrom eth.BlockID) (prevDerivedFrom types.BlockSeal, err error) + func (db *DB) Rewind(derivedFrom uint64) error + type Entry [EntrySize]byte + func (e Entry) Type() EntryType + type EntryBinary struct + func (EntryBinary) Append(dest []byte, e *Entry) []byte + func (EntryBinary) EntrySize() int + func (EntryBinary) ReadAt(dest *Entry, r io.ReaderAt, at int64) (n int, err error) + type EntryStore interface + Append func(entries ...Entry) error + Close func() error + LastEntryIdx func() entrydb.EntryIdx + Read func(idx entrydb.EntryIdx) (Entry, error) + Size func() int64 + Truncate func(idx entrydb.EntryIdx) error + type EntryType uint8 + const DerivedFromV0 + func (s EntryType) String() string + type LinkEntry struct + func (d LinkEntry) String() string + type Metrics interface + RecordDBDerivedEntryCount func(count int64) + func AdaptMetrics(chainMetrics ChainMetrics, kind string) Metrics