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() defer f.Close()
fileStore := storage.NewFileStore(&storage.FakeChunkStore{}, storage.NewFileStoreParams()) 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 { if err != nil {
utils.Fatalf("%v\n", err) utils.Fatalf("%v\n", err)
} else { } else {
//fmt.Printf("%v\n", addr) for _, r := range refs {
fmt.Println("Done.") fmt.Println(r.String())
}
} }
} }

View file

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