diff options
author | Péter Szilágyi <peterke@gmail.com> | 2019-08-01 16:00:56 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-08-01 16:00:56 +0800 |
commit | e46a01d56c190badd6b71a4fba6c886fcee1059b (patch) | |
tree | e8827b77cc31474d1ac1a6ae42353c2647093a52 | |
parent | 7f3362595a3bdf1c27b17f16b7d90d89882312ab (diff) | |
download | go-tangerine-e46a01d56c190badd6b71a4fba6c886fcee1059b.tar go-tangerine-e46a01d56c190badd6b71a4fba6c886fcee1059b.tar.gz go-tangerine-e46a01d56c190badd6b71a4fba6c886fcee1059b.tar.bz2 go-tangerine-e46a01d56c190badd6b71a4fba6c886fcee1059b.tar.lz go-tangerine-e46a01d56c190badd6b71a4fba6c886fcee1059b.tar.xz go-tangerine-e46a01d56c190badd6b71a4fba6c886fcee1059b.tar.zst go-tangerine-e46a01d56c190badd6b71a4fba6c886fcee1059b.zip |
ethdb/memorydb: allow noop compact on memdb (#19907)
* ethdb/memorydb: allow noop compact on memdb
* ethdb/memorydb: fix comment type
-rw-r--r-- | ethdb/memorydb/memorydb.go | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/ethdb/memorydb/memorydb.go b/ethdb/memorydb/memorydb.go index 70eb8964d..346edc438 100644 --- a/ethdb/memorydb/memorydb.go +++ b/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. |