mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-20 10:52:25 +00:00
cmd/swarm: explore command (prints refs) and chunk-explorer in swarm-smoke
This commit is contained in:
parent
ba3849af4a
commit
3a783d508c
2 changed files with 4 additions and 5 deletions
|
|
@ -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())
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -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"
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue