Commit 53ac85cf authored by Taylor Gerring's avatar Taylor Gerring

BlockHash must be a string

parent d465e410
......@@ -40,7 +40,12 @@ func (args *GetBlockByHashArgs) UnmarshalJSON(b []byte) (err error) {
if len(obj) < 1 {
return errArguments
}
args.BlockHash = obj[0].(string)
argstr, ok := obj[0].(string)
if !ok {
return errDecodeArgs
}
args.BlockHash = argstr
if len(obj) > 1 {
args.Transactions = obj[1].(bool)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment