diff options
author | Taylor Gerring <taylor.gerring@gmail.com> | 2015-03-17 04:49:51 +0800 |
---|---|---|
committer | Taylor Gerring <taylor.gerring@gmail.com> | 2015-03-17 04:49:51 +0800 |
commit | 176115e22ecc5e86179784ba5027c84e538423c4 (patch) | |
tree | 0449de8ec15c875da8a5bc4ac9649e1014b051fe /rpc/util.go | |
parent | 0339a138625aca8647e5d51488e6d679202cdddb (diff) | |
download | dexon-176115e22ecc5e86179784ba5027c84e538423c4.tar.gz dexon-176115e22ecc5e86179784ba5027c84e538423c4.tar.zst dexon-176115e22ecc5e86179784ba5027c84e538423c4.zip |
More empty param tests
Diffstat (limited to 'rpc/util.go')
-rw-r--r-- | rpc/util.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/rpc/util.go b/rpc/util.go index 08f404c99..e5610dc2c 100644 --- a/rpc/util.go +++ b/rpc/util.go @@ -45,6 +45,11 @@ func UnmarshalRawMessages(b []byte, iface interface{}, number *int64) (err error return NewDecodeParamError(err.Error()) } + // Hrm... Occurs when no params + if len(data) == 0 { + return NewDecodeParamError("No data") + } + // Number index determines the index in the array for a possible block number numberIndex := 0 |