From ad5b329a3960a8139c1fc1e3a36f82d11f34fef8 Mon Sep 17 00:00:00 2001 From: Janos Guljas Date: Tue, 22 Jan 2019 10:56:03 +0100 Subject: [PATCH] swarm/storage/localstore: remove unused code --- swarm/storage/localstore/gc_test.go | 12 ------------ swarm/storage/localstore/localstore.go | 2 -- 2 files changed, 14 deletions(-) diff --git a/swarm/storage/localstore/gc_test.go b/swarm/storage/localstore/gc_test.go index 15400a03bb..eb039a554a 100644 --- a/swarm/storage/localstore/gc_test.go +++ b/swarm/storage/localstore/gc_test.go @@ -294,18 +294,6 @@ func TestDB_gcSize(t *testing.T) { t.Run("gc uncounted hashes index count", newItemsCountTest(db.gcUncountedHashesIndex, 0)) } -func testStoredGCSize(t *testing.T, db *DB, want uint64) { - t.Helper() - - got, err := db.storedGCSize.Get() - if err != nil { - t.Fatal(err) - } - if got != want { - t.Errorf("got stored gc size %v, want %v", got, want) - } -} - // setTestHookCollectGarbage sets testHookCollectGarbage and // returns a function that will reset it to the // value before the change. diff --git a/swarm/storage/localstore/localstore.go b/swarm/storage/localstore/localstore.go index 0c75489c72..9b312e395e 100644 --- a/swarm/storage/localstore/localstore.go +++ b/swarm/storage/localstore/localstore.go @@ -33,8 +33,6 @@ var ( // ErrInvalidMode is retuned when an unknown Mode // is provided to the function. ErrInvalidMode = errors.New("invalid mode") - // ErrDBClosed is returned when database is closed. - ErrDBClosed = errors.New("db closed") // ErrAddressLockTimeout is returned when the same chunk // is updated in parallel and one of the updates // takes longer then the configured timeout duration.