aboutsummaryrefslogtreecommitdiffstats
path: root/rpc/args.go
diff options
context:
space:
mode:
authorTaylor Gerring <taylor.gerring@gmail.com>2015-03-26 23:19:33 +0800
committerTaylor Gerring <taylor.gerring@gmail.com>2015-03-26 23:19:33 +0800
commit745dd5b7a517cf0930f96a9b162821d0d631dea9 (patch)
treec2f645a18754c98d59804b7adb417d1b377d0889 /rpc/args.go
parentf695d013548ca3399ac2f2900307bf085290aa61 (diff)
downloadgo-tangerine-745dd5b7a517cf0930f96a9b162821d0d631dea9.tar
go-tangerine-745dd5b7a517cf0930f96a9b162821d0d631dea9.tar.gz
go-tangerine-745dd5b7a517cf0930f96a9b162821d0d631dea9.tar.bz2
go-tangerine-745dd5b7a517cf0930f96a9b162821d0d631dea9.tar.lz
go-tangerine-745dd5b7a517cf0930f96a9b162821d0d631dea9.tar.xz
go-tangerine-745dd5b7a517cf0930f96a9b162821d0d631dea9.tar.zst
go-tangerine-745dd5b7a517cf0930f96a9b162821d0d631dea9.zip
Sha3Args
Diffstat (limited to 'rpc/args.go')
-rw-r--r--rpc/args.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/rpc/args.go b/rpc/args.go
index d3449928b..b23216c98 100644
--- a/rpc/args.go
+++ b/rpc/args.go
@@ -388,8 +388,12 @@ func (args *Sha3Args) UnmarshalJSON(b []byte) (err error) {
if len(obj) < 1 {
return NewInsufficientParamsError(len(obj), 1)
}
- args.Data = obj[0].(string)
+ argstr, ok := obj[0].(string)
+ if !ok {
+ return NewInvalidTypeError("data", "is not a string")
+ }
+ args.Data = argstr
return nil
}