More empty param tests

This commit is contained in:
Taylor Gerring
2015-03-16 16:49:51 -04:00
parent 0339a13862
commit 176115e22e
2 changed files with 55 additions and 0 deletions

View File

@ -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