From 723074e71bbe1638a5cec9b996b1eed07a76fd72 Mon Sep 17 00:00:00 2001 From: obscuren Date: Fri, 19 Sep 2014 13:32:52 +0200 Subject: [PATCH] dump --- ethereum/flags.go | 1 + ethereum/main.go | 2 ++ 2 files changed, 3 insertions(+) diff --git a/ethereum/flags.go b/ethereum/flags.go index 5ed208411..c488e6314 100644 --- a/ethereum/flags.go +++ b/ethereum/flags.go @@ -74,6 +74,7 @@ func Init() { flag.IntVar(&LogLevel, "loglevel", int(ethlog.InfoLevel), "loglevel: 0-5: silent,error,warn,info,debug,debug detail)") flag.BoolVar(&DiffTool, "difftool", false, "creates output for diff'ing. Sets LogLevel=0") flag.StringVar(&DiffType, "diff", "all", "sets the level of diff output [vm, all]. Has no effect if difftool=false") + flag.BoolVar(&ShowGenesis, "genesis", false, "Dump the genesis block") flag.BoolVar(&Dump, "dump", false, "output the ethereum state in JSON format. Sub args [number, hash]") flag.StringVar(&DumpHash, "hash", "", "specify arg in hex") diff --git a/ethereum/main.go b/ethereum/main.go index ab6ce18b2..df9737c1f 100644 --- a/ethereum/main.go +++ b/ethereum/main.go @@ -76,6 +76,8 @@ func main() { os.Exit(1) } + fmt.Printf("RLP: %x\nstate: %x\nhash: %x\n", ethutil.Rlp(block), block.GetRoot(), block.Hash()) + // Leave the Println. This needs clean output for piping fmt.Printf("%s\n", block.State().Dump())