cmd/swarm, swarm: LocalStore storage integration
This commit is contained in:
committed by
Anton Evangelatov
parent
c94d582aa7
commit
996755c4a8
@ -26,6 +26,7 @@ import (
|
||||
"github.com/ethereum/go-ethereum/swarm/api"
|
||||
"github.com/ethereum/go-ethereum/swarm/storage"
|
||||
"github.com/ethereum/go-ethereum/swarm/storage/feed"
|
||||
"github.com/ethereum/go-ethereum/swarm/storage/localstore"
|
||||
)
|
||||
|
||||
type TestServer interface {
|
||||
@ -37,16 +38,12 @@ func NewTestSwarmServer(t *testing.T, serverFunc func(*api.API) TestServer, reso
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
storeParams := storage.NewDefaultLocalStoreParams()
|
||||
storeParams.DbCapacity = 5000000
|
||||
storeParams.CacheCapacity = 5000
|
||||
storeParams.Init(swarmDir)
|
||||
localStore, err := storage.NewLocalStore(storeParams, nil)
|
||||
localStore, err := localstore.New(dir, make([]byte, 32), nil)
|
||||
if err != nil {
|
||||
os.RemoveAll(swarmDir)
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
fileStore := storage.NewFileStore(localStore, storage.NewFileStoreParams())
|
||||
// Swarm feeds test setup
|
||||
feedsDir, err := ioutil.TempDir("", "swarm-feeds-test")
|
||||
|
Reference in New Issue
Block a user