diff --git a/pkg/backend.go b/pkg/backend.go index a634e73..c24c018 100644 --- a/pkg/backend.go +++ b/pkg/backend.go @@ -97,16 +97,12 @@ func (s *LevelDBBackend) ModifyAncients(f func(ethdb.AncientWriteOp) error) (int return 0, errWriteNotAllowed } -func (s *LevelDBBackend) TruncateAncients(n uint64) error { - return errWriteNotAllowed +func (s *LevelDBBackend) TruncateHead(n uint64) (uint64, error) { + return 0, errWriteNotAllowed } -func (s *LevelDBBackend) TruncateHead(n uint64) error { - return errWriteNotAllowed -} - -func (s *LevelDBBackend) TruncateTail(n uint64) error { - return errWriteNotAllowed +func (s *LevelDBBackend) TruncateTail(n uint64) (uint64, error) { + return 0, errWriteNotAllowed } func (s *LevelDBBackend) Sync() error { diff --git a/pkg/client/database.go b/pkg/client/database.go index f75e52c..7ddb7c9 100644 --- a/pkg/client/database.go +++ b/pkg/client/database.go @@ -212,14 +212,14 @@ func (d *DatabaseClient) ModifyAncients(f func(ethdb.AncientWriteOp) error) (int // TruncateHead satisfies the ethdb.AncientWriter interface. // TruncateHead discards all but the first n ancient data from the ancient store. -func (d *DatabaseClient) TruncateHead(n uint64) error { - return errNotSupported +func (d *DatabaseClient) TruncateHead(n uint64) (uint64, error) { + return 0, errNotSupported } // TruncateTail satisfies the ethdb.AncientWriter interface. // TruncateTail discards the first n ancient data from the ancient store. -func (d *DatabaseClient) TruncateTail(n uint64) error { - return errNotSupported +func (d *DatabaseClient) TruncateTail(n uint64) (uint64, error) { + return 0, errNotSupported } // Sync satisfies the ethdb.AncientWriter interface