swarm: clean up unused private types and functions (#17989)

* swarm: clean up unused private types and functions

Those that were identified by code inspection tool.

* swarm/storage: move/add Proximity GoDoc from deleted private function

The mentioned proximity() private function was deleted in:
1ca8fc1e6f
This commit is contained in:
Ferenc Szabo
2018-10-27 16:18:42 +02:00
committed by Anton Evangelatov
parent 8ed4739176
commit 54f650a3be
10 changed files with 13 additions and 108 deletions

View File

@ -39,7 +39,6 @@ import (
"github.com/ethereum/go-ethereum/swarm/log"
"github.com/ethereum/go-ethereum/swarm/storage/mock"
"github.com/syndtr/goleveldb/leveldb"
"github.com/syndtr/goleveldb/leveldb/opt"
)
const (
@ -72,13 +71,6 @@ var (
ErrDBClosed = errors.New("LDBStore closed")
)
type gcItem struct {
idx *dpaDBIndex
value uint64
idxKey []byte
po uint8
}
type LDBStoreParams struct {
*StoreParams
Path string
@ -961,15 +953,3 @@ func (s *LDBStore) SyncIterator(since uint64, until uint64, po uint8, f func(Add
}
return it.Error()
}
func databaseExists(path string) bool {
o := &opt.Options{
ErrorIfMissing: true,
}
tdb, err := leveldb.OpenFile(path, o)
if err != nil {
return false
}
defer tdb.Close()
return true
}