diff options
author | Taylor Gerring <taylor.gerring@gmail.com> | 2015-03-26 18:59:35 +0800 |
---|---|---|
committer | Taylor Gerring <taylor.gerring@gmail.com> | 2015-03-26 18:59:35 +0800 |
commit | 300d36b8640cf195db0f7997cc946ab5f164828f (patch) | |
tree | 4663f915ca35bc77ceb97cce4825bbe6046bcb2c /rpc/args.go | |
parent | ad2089b0a3a495d8584209b6e31dde153cac7088 (diff) | |
download | dexon-300d36b8640cf195db0f7997cc946ab5f164828f.tar.gz dexon-300d36b8640cf195db0f7997cc946ab5f164828f.tar.zst dexon-300d36b8640cf195db0f7997cc946ab5f164828f.zip |
improved NewTxArgs tests
Diffstat (limited to 'rpc/args.go')
-rw-r--r-- | rpc/args.go | 7 |
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 } } |