aboutsummaryrefslogtreecommitdiffstats
path: root/cmd/swarm/hash.go
diff options
context:
space:
mode:
authorViktor TrĂ³n <viktor.tron@gmail.com>2018-06-22 05:00:43 +0800
committerGitHub <noreply@github.com>2018-06-22 05:00:43 +0800
commiteaff89291ce998ba4bf9b9816ca8a15c8b85f440 (patch)
treec77d7a06627a1a7f578d0fec8e39788e66672e53 /cmd/swarm/hash.go
parentd926bf2c7e3182d694c15829a37a0ca7331cd03c (diff)
parente187711c6545487d4cac3701f0f506bb536234e2 (diff)
downloadgo-tangerine-eaff89291ce998ba4bf9b9816ca8a15c8b85f440.tar.gz
go-tangerine-eaff89291ce998ba4bf9b9816ca8a15c8b85f440.tar.zst
go-tangerine-eaff89291ce998ba4bf9b9816ca8a15c8b85f440.zip
Merge pull request #17041 from ethersphere/swarm-network-rewrite-merge
Swarm POC3 - happy solstice
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)
}
}