aboutsummaryrefslogtreecommitdiffstats
path: root/rpc/args.go
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2015-03-24 01:30:11 +0800
committerobscuren <geffobscura@gmail.com>2015-03-24 01:30:11 +0800
commitf2f65c1a65d39a31fa0c6ed574fb2a6e213de5d4 (patch)
treeee4f85745fc5f863464453edbd47d90d107efd16 /rpc/args.go
parentc8e9ca048327d7074cfd58137ebf89e065763b71 (diff)
parent90c710fd2687a0c9f3b3e4f5f3b9b69febc506e8 (diff)
downloaddexon-f2f65c1a65d39a31fa0c6ed574fb2a6e213de5d4.tar
dexon-f2f65c1a65d39a31fa0c6ed574fb2a6e213de5d4.tar.gz
dexon-f2f65c1a65d39a31fa0c6ed574fb2a6e213de5d4.tar.bz2
dexon-f2f65c1a65d39a31fa0c6ed574fb2a6e213de5d4.tar.lz
dexon-f2f65c1a65d39a31fa0c6ed574fb2a6e213de5d4.tar.xz
dexon-f2f65c1a65d39a31fa0c6ed574fb2a6e213de5d4.tar.zst
dexon-f2f65c1a65d39a31fa0c6ed574fb2a6e213de5d4.zip
Merge branch 'develop' of github.com-obscure:ethereum/go-ethereum into develop
Diffstat (limited to 'rpc/args.go')
-rw-r--r--rpc/args.go9
1 files changed, 4 insertions, 5 deletions
diff --git a/rpc/args.go b/rpc/args.go
index 6e02b65ef..5b655024c 100644
--- a/rpc/args.go
+++ b/rpc/args.go
@@ -467,7 +467,7 @@ func (args *BlockFilterArgs) UnmarshalJSON(b []byte) (err error) {
switch fromstr {
case "latest":
- args.Earliest = 0
+ args.Earliest = -1
default:
args.Earliest = int64(common.Big(obj[0].FromBlock.(string)).Int64())
}
@@ -479,9 +479,9 @@ func (args *BlockFilterArgs) UnmarshalJSON(b []byte) (err error) {
switch tostr {
case "latest":
- args.Latest = 0
- case "pending":
args.Latest = -1
+ case "pending":
+ args.Latest = -2
default:
args.Latest = int64(common.Big(obj[0].ToBlock.(string)).Int64())
}
@@ -775,8 +775,7 @@ func (args *SubmitWorkArgs) UnmarshalJSON(b []byte) (err error) {
return NewDecodeParamError("Nonce is not a string")
}
- args.Nonce = common.BytesToNumber(common.Hex2Bytes(objstr))
-
+ args.Nonce = common.String2Big(objstr).Uint64()
if objstr, ok = obj[1].(string); !ok {
return NewDecodeParamError("Header is not a string")
}