ethdb: interface AncientBytes

Signed-off-by: jsvisa <delweng@gmail.com>
This commit is contained in:
jsvisa 2025-07-02 01:31:23 +08:00 committed by Gary Rong
parent 1459c2ed24
commit 32884e0b43
2 changed files with 7 additions and 0 deletions

View file

@ -121,6 +121,9 @@ type AncientReaderOp interface {
// - if maxBytes is not specified, 'count' items will be returned if they are present
AncientRange(kind string, start, count, maxBytes uint64) ([][]byte, error)
// AncientBytes retrieves a byte range [offset:offset+length] from the specified ancient item.
AncientBytes(kind string, number uint64, offset, length uint64) ([]byte, error)
// Ancients returns the ancient item numbers in the ancient store.
Ancients() (uint64, error)

View file

@ -140,6 +140,10 @@ func (db *Database) Close() error {
return nil
}
func (db *Database) AncientBytes(kind string, item, offset, length uint64) ([]byte, error) {
panic("not supported")
}
func New(client *rpc.Client) ethdb.Database {
if client == nil {
return nil