diff options
author | obscuren <geffobscura@gmail.com> | 2015-03-18 20:00:01 +0800 |
---|---|---|
committer | obscuren <geffobscura@gmail.com> | 2015-03-18 20:00:01 +0800 |
commit | 0a1eeca41e6ba5920ba65d9b41654768299bc7e3 (patch) | |
tree | 0c286872355608c317f9e0ec1897bb79386ae94f /cmd | |
parent | 942980609fb8a36873689bd3bd0a15488f327d56 (diff) | |
download | go-tangerine-0a1eeca41e6ba5920ba65d9b41654768299bc7e3.tar.gz go-tangerine-0a1eeca41e6ba5920ba65d9b41654768299bc7e3.tar.zst go-tangerine-0a1eeca41e6ba5920ba65d9b41654768299bc7e3.zip |
conversions. -compilable-
Diffstat (limited to 'cmd')
-rw-r--r-- | cmd/ethereum/admin.go | 4 | ||||
-rw-r--r-- | cmd/ethereum/main.go | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/cmd/ethereum/admin.go b/cmd/ethereum/admin.go index 880a22c22..967af2553 100644 --- a/cmd/ethereum/admin.go +++ b/cmd/ethereum/admin.go @@ -8,8 +8,8 @@ import ( "time" "github.com/ethereum/go-ethereum/cmd/utils" - "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/rlp" "github.com/ethereum/go-ethereum/rpc" "github.com/ethereum/go-ethereum/state" @@ -239,7 +239,7 @@ func (js *jsre) dumpBlock(call otto.FunctionCall) otto.Value { block = js.ethereum.ChainManager().GetBlockByNumber(uint64(num)) } else if call.Argument(0).IsString() { hash, _ := call.Argument(0).ToString() - block = js.ethereum.ChainManager().GetBlock(common.Hex2Bytes(hash)) + block = js.ethereum.ChainManager().GetBlock(common.HexToHash(hash)) } else { fmt.Println("invalid argument for dump. Either hex string or number") } diff --git a/cmd/ethereum/main.go b/cmd/ethereum/main.go index 3b952dd79..459059e6c 100644 --- a/cmd/ethereum/main.go +++ b/cmd/ethereum/main.go @@ -302,7 +302,7 @@ func dump(ctx *cli.Context) { for _, arg := range ctx.Args() { var block *types.Block if hashish(arg) { - block = chainmgr.GetBlock(common.Hex2Bytes(arg)) + block = chainmgr.GetBlock(common.HexToHash(arg)) } else { num, _ := strconv.Atoi(arg) block = chainmgr.GetBlockByNumber(uint64(num)) |