aboutsummaryrefslogtreecommitdiffstats
path: root/rpc/args.go
diff options
context:
space:
mode:
authorTaylor Gerring <taylor.gerring@gmail.com>2015-03-26 18:59:35 +0800
committerTaylor Gerring <taylor.gerring@gmail.com>2015-03-26 18:59:35 +0800
commit300d36b8640cf195db0f7997cc946ab5f164828f (patch)
tree4663f915ca35bc77ceb97cce4825bbe6046bcb2c /rpc/args.go
parentad2089b0a3a495d8584209b6e31dde153cac7088 (diff)
downloaddexon-300d36b8640cf195db0f7997cc946ab5f164828f.tar
dexon-300d36b8640cf195db0f7997cc946ab5f164828f.tar.gz
dexon-300d36b8640cf195db0f7997cc946ab5f164828f.tar.bz2
dexon-300d36b8640cf195db0f7997cc946ab5f164828f.tar.lz
dexon-300d36b8640cf195db0f7997cc946ab5f164828f.tar.xz
dexon-300d36b8640cf195db0f7997cc946ab5f164828f.tar.zst
dexon-300d36b8640cf195db0f7997cc946ab5f164828f.zip
improved NewTxArgs tests
Diffstat (limited to 'rpc/args.go')
-rw-r--r--rpc/args.go7
1 files changed, 1 insertions, 6 deletions
diff --git a/rpc/args.go b/rpc/args.go
index fc7307b83..82ee00d25 100644
--- a/rpc/args.go
+++ b/rpc/args.go
@@ -145,12 +145,7 @@ func (args *NewTxArgs) UnmarshalJSON(b []byte) (err error) {
// Check for optional BlockNumber param
if len(obj) > 1 {
- var raw interface{}
- if err = json.Unmarshal(obj[1], &raw); err != nil {
- return NewDecodeParamError(err.Error())
- }
-
- if err := blockHeight(raw, &args.BlockNumber); err != nil {
+ if err := blockHeightFromJson(obj[1], &args.BlockNumber); err != nil {
return err
}
}