update methods

This commit is contained in:
Roy Crihfield 2024-04-24 19:02:16 +08:00
parent 953a814054
commit 4a9a0d18ee
2 changed files with 8 additions and 12 deletions

View File

@ -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 {

View File

@ -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