ethdb/memorydb: allow noop compact on memdb (#19907)

* ethdb/memorydb: allow noop compact on memdb

* ethdb/memorydb: fix comment type
pull/19911/head
Péter Szilágyi 5 years ago committed by GitHub
parent 7f3362595a
commit e46a01d56c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 5
      ethdb/memorydb/memorydb.go

@ -197,9 +197,10 @@ func (db *Database) Stat(property string) (string, error) {
return "", errors.New("unknown property")
}
// Compact is not supported on a memory database.
// Compact is not supported on a memory database, but there's no need either as
// a memory database doesn't waste space anyway.
func (db *Database) Compact(start []byte, limit []byte) error {
return errors.New("unsupported operation")
return nil
}
// Len returns the number of entries currently present in the memory database.

Loading…
Cancel
Save