diff options
author | obscuren <geffobscura@gmail.com> | 2015-03-11 03:16:08 +0800 |
---|---|---|
committer | obscuren <geffobscura@gmail.com> | 2015-03-11 03:16:08 +0800 |
commit | d9f96293bee9bee16ee6abd9774b385df0b9ad87 (patch) | |
tree | bee9fc46c70d3bb6cab0dc1528b6736fe6568126 /rpc/args.go | |
parent | f22684439a807f88406e90718e61d536edd469f1 (diff) | |
parent | 3d6519e45bbd689b75c3ad6966c2044f29c649df (diff) | |
download | go-tangerine-d9f96293bee9bee16ee6abd9774b385df0b9ad87.tar.gz go-tangerine-d9f96293bee9bee16ee6abd9774b385df0b9ad87.tar.zst go-tangerine-d9f96293bee9bee16ee6abd9774b385df0b9ad87.zip |
Merge branch 'rpcfrontier' of github.com-obscure:ethereum/go-ethereum into rpcfrontier
Conflicts:
rpc/args.go
Diffstat (limited to 'rpc/args.go')
-rw-r--r-- | rpc/args.go | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/rpc/args.go b/rpc/args.go index 3d4c8667a..ab711e78f 100644 --- a/rpc/args.go +++ b/rpc/args.go @@ -3,7 +3,6 @@ package rpc import ( "bytes" "encoding/json" - "fmt" "math/big" "github.com/ethereum/go-ethereum/ethutil" @@ -65,7 +64,12 @@ func (args *GetBlockByNumberArgs) UnmarshalJSON(b []byte) (err error) { if len(obj) < 1 { return errArguments } - args.BlockNumber = ethutil.Big(obj[0].(string)).Int64() + + if v, ok := obj[0].(float64); ok { + args.BlockNumber = int64(v) + } else { + args.BlockNumber = ethutil.Big(obj[0].(string)).Int64() + } if len(obj) > 1 { args.Transactions = obj[1].(bool) @@ -110,7 +114,6 @@ func (args *GetStorageArgs) UnmarshalJSON(b []byte) (err error) { if err = UnmarshalRawMessages(b, &args.Address, &args.BlockNumber); err != nil { return errDecodeArgs } - fmt.Println(args) return nil } @@ -140,8 +143,6 @@ func (args *GetStorageAtArgs) UnmarshalJSON(b []byte) (err error) { args.Address = obj[0] args.Key = obj[1] - fmt.Println(args) - return nil } |