From e46a01d56c190badd6b71a4fba6c886fcee1059b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=A9ter=20Szil=C3=A1gyi?= Date: Thu, 1 Aug 2019 11:00:56 +0300 Subject: [PATCH] ethdb/memorydb: allow noop compact on memdb (#19907) * ethdb/memorydb: allow noop compact on memdb * ethdb/memorydb: fix comment type --- ethdb/memorydb/memorydb.go | 5 +++-- 1 file 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.