From 53ac85cfd3188f96bc595a131732bbdbd5d49687 Mon Sep 17 00:00:00 2001 From: Taylor Gerring Date: Wed, 11 Mar 2015 10:27:24 -0500 Subject: [PATCH] BlockHash must be a string --- rpc/args.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/rpc/args.go b/rpc/args.go index ff41e501f..26a61b1a1 100644 --- a/rpc/args.go +++ b/rpc/args.go @@ -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)