aboutsummaryrefslogtreecommitdiffstats
path: root/rpc/args.go
diff options
context:
space:
mode:
authorTaylor Gerring <taylor.gerring@gmail.com>2015-03-24 00:33:01 +0800
committerTaylor Gerring <taylor.gerring@gmail.com>2015-03-24 00:33:01 +0800
commit1e61b75cbf0830a72b40d0eed8f924cb7bb61aa3 (patch)
tree892a12c0f76cbe7873ce7fbbb3b21c5ecdb0610a /rpc/args.go
parent0330077d76b48934ab024a309000f83c78047d8a (diff)
downloaddexon-1e61b75cbf0830a72b40d0eed8f924cb7bb61aa3.tar.gz
dexon-1e61b75cbf0830a72b40d0eed8f924cb7bb61aa3.tar.zst
dexon-1e61b75cbf0830a72b40d0eed8f924cb7bb61aa3.zip
tests + fixes
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")
}