aboutsummaryrefslogtreecommitdiffstats
path: root/rpc/args.go
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2015-03-12 00:00:30 +0800
committerobscuren <geffobscura@gmail.com>2015-03-12 00:00:30 +0800
commit2da7af4ba0913acc74c554422a04958f3f8d78b9 (patch)
tree6e0528ee381ef9367984f2e190d1dbfbeb8e9f53 /rpc/args.go
parente8d1b622d9381a2717f1a09f29078e07c23b01bd (diff)
parent90f34ed40a1b3c87073d7e2e13b5515cc4cb3940 (diff)
downloadgo-tangerine-2da7af4ba0913acc74c554422a04958f3f8d78b9.tar
go-tangerine-2da7af4ba0913acc74c554422a04958f3f8d78b9.tar.gz
go-tangerine-2da7af4ba0913acc74c554422a04958f3f8d78b9.tar.bz2
go-tangerine-2da7af4ba0913acc74c554422a04958f3f8d78b9.tar.lz
go-tangerine-2da7af4ba0913acc74c554422a04958f3f8d78b9.tar.xz
go-tangerine-2da7af4ba0913acc74c554422a04958f3f8d78b9.tar.zst
go-tangerine-2da7af4ba0913acc74c554422a04958f3f8d78b9.zip
Merge branch 'rpcfrontier' of github.com-obscure:ethereum/go-ethereum into rpcfrontier
Diffstat (limited to 'rpc/args.go')
-rw-r--r--rpc/args.go17
1 files changed, 11 insertions, 6 deletions
diff --git a/rpc/args.go b/rpc/args.go
index 2f361526a..d4d807060 100644
--- a/rpc/args.go
+++ b/rpc/args.go
@@ -40,7 +40,12 @@ func (args *GetBlockByHashArgs) UnmarshalJSON(b []byte) (err error) {
if len(obj) < 1 {
return errArguments
}
- args.BlockHash = obj[0].(string)
+
+ argstr, ok := obj[0].(string)
+ if !ok {
+ return errDecodeArgs
+ }
+ args.BlockHash = argstr
if len(obj) > 1 {
args.Transactions = obj[1].(bool)
@@ -219,12 +224,12 @@ func (args *GetDataArgs) requirements() error {
type BlockNumIndexArgs struct {
BlockNumber int64
- TxIndex int64
+ Index int64
}
type HashIndexArgs struct {
BlockHash string
- TxIndex int64
+ Index int64
}
type Sha3Args struct {
@@ -362,7 +367,7 @@ type WhisperMessageArgs struct {
Payload string
To string
From string
- Topic []string
+ Topics []string
Priority uint32
Ttl uint32
}
@@ -372,7 +377,7 @@ func (args *WhisperMessageArgs) UnmarshalJSON(b []byte) (err error) {
Payload string
To string
From string
- Topic []string
+ Topics []string
Priority string
Ttl string
}
@@ -387,7 +392,7 @@ func (args *WhisperMessageArgs) UnmarshalJSON(b []byte) (err error) {
args.Payload = obj[0].Payload
args.To = obj[0].To
args.From = obj[0].From
- args.Topic = obj[0].Topic
+ args.Topics = obj[0].Topics
args.Priority = uint32(ethutil.Big(obj[0].Priority).Int64())
args.Ttl = uint32(ethutil.Big(obj[0].Ttl).Int64())