cmd/swarm: explore command (prints refs) and chunk-explorer in swarm-smoke

This commit is contained in:
Fabio Barone 2019-02-03 20:53:37 -05:00
parent ba3849af4a
commit 3a783d508c
2 changed files with 4 additions and 5 deletions

View file

@ -48,11 +48,12 @@ func explore(ctx *cli.Context) {
defer f.Close()
fileStore := storage.NewFileStore(&storage.FakeChunkStore{}, storage.NewFileStoreParams())
_, err = fileStore.GetAllReferences(context.TODO(), f, false)
refs, err := fileStore.GetAllReferences(context.TODO(), f, false)
if err != nil {
utils.Fatalf("%v\n", err)
} else {
//fmt.Printf("%v\n", addr)
fmt.Println("Done.")
for _, r := range refs {
fmt.Println(r.String())
}
}
}

View file

@ -17,8 +17,6 @@
package main
import (
"fmt"
"github.com/ethereum/go-ethereum/log"
"github.com/ethereum/go-ethereum/rpc"
cli "gopkg.in/urfave/cli.v1"