aboutsummaryrefslogtreecommitdiffstats
path: root/swarm/storage/mru/testutil.go
diff options
context:
space:
mode:
Diffstat (limited to 'swarm/storage/mru/testutil.go')
-rw-r--r--swarm/storage/mru/testutil.go12
1 files changed, 6 insertions, 6 deletions
diff --git a/swarm/storage/mru/testutil.go b/swarm/storage/mru/testutil.go
index 7a5a9e4d9..80e0d4cf0 100644
--- a/swarm/storage/mru/testutil.go
+++ b/swarm/storage/mru/testutil.go
@@ -27,7 +27,7 @@ import (
)
const (
- testDbDirName = "mru"
+ testDbDirName = "feeds"
)
type TestHandler struct {
@@ -52,20 +52,20 @@ func newFakeNetFetcher(context.Context, storage.Address, *sync.Map) storage.NetF
// NewTestHandler creates Handler object to be used for testing purposes.
func NewTestHandler(datadir string, params *HandlerParams) (*TestHandler, error) {
path := filepath.Join(datadir, testDbDirName)
- rh := NewHandler(params)
+ fh := NewHandler(params)
localstoreparams := storage.NewDefaultLocalStoreParams()
localstoreparams.Init(path)
localStore, err := storage.NewLocalStore(localstoreparams, nil)
if err != nil {
return nil, fmt.Errorf("localstore create fail, path %s: %v", path, err)
}
- localStore.Validators = append(localStore.Validators, storage.NewContentAddressValidator(storage.MakeHashFunc(resourceHashAlgorithm)))
- localStore.Validators = append(localStore.Validators, rh)
+ localStore.Validators = append(localStore.Validators, storage.NewContentAddressValidator(storage.MakeHashFunc(feedsHashAlgorithm)))
+ localStore.Validators = append(localStore.Validators, fh)
netStore, err := storage.NewNetStore(localStore, nil)
if err != nil {
return nil, err
}
netStore.NewNetFetcherFunc = newFakeNetFetcher
- rh.SetStore(netStore)
- return &TestHandler{rh}, nil
+ fh.SetStore(netStore)
+ return &TestHandler{fh}, nil
}