mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-23 05:06:43 +00:00
ethdb: interface AncientBytes
Signed-off-by: jsvisa <delweng@gmail.com>
This commit is contained in:
parent
1459c2ed24
commit
32884e0b43
2 changed files with 7 additions and 0 deletions
|
|
@ -121,6 +121,9 @@ type AncientReaderOp interface {
|
||||||
// - if maxBytes is not specified, 'count' items will be returned if they are present
|
// - if maxBytes is not specified, 'count' items will be returned if they are present
|
||||||
AncientRange(kind string, start, count, maxBytes uint64) ([][]byte, error)
|
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 returns the ancient item numbers in the ancient store.
|
||||||
Ancients() (uint64, error)
|
Ancients() (uint64, error)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -140,6 +140,10 @@ func (db *Database) Close() error {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (db *Database) AncientBytes(kind string, item, offset, length uint64) ([]byte, error) {
|
||||||
|
panic("not supported")
|
||||||
|
}
|
||||||
|
|
||||||
func New(client *rpc.Client) ethdb.Database {
|
func New(client *rpc.Client) ethdb.Database {
|
||||||
if client == nil {
|
if client == nil {
|
||||||
return nil
|
return nil
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue