aboutsummaryrefslogtreecommitdiffstats
path: root/cmd/swarm/hash.go
diff options
context:
space:
mode:
Diffstat (limited to 'cmd/swarm/hash.go')
-rw-r--r--cmd/swarm/hash.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/cmd/swarm/hash.go b/cmd/swarm/hash.go
index 792e8d0d7..c82456b3c 100644
--- a/cmd/swarm/hash.go
+++ b/cmd/swarm/hash.go
@@ -38,11 +38,11 @@ func hash(ctx *cli.Context) {
defer f.Close()
stat, _ := f.Stat()
- chunker := storage.NewTreeChunker(storage.NewChunkerParams())
- key, err := chunker.Split(f, stat.Size(), nil, nil, nil)
+ fileStore := storage.NewFileStore(storage.NewMapChunkStore(), storage.NewFileStoreParams())
+ addr, _, err := fileStore.Store(f, stat.Size(), false)
if err != nil {
utils.Fatalf("%v\n", err)
} else {
- fmt.Printf("%v\n", key)
+ fmt.Printf("%v\n", addr)
}
}