forked from cerc-io/plugeth
BlockHash must be a string
This commit is contained in:
parent
d465e410ef
commit
53ac85cfd3
@ -40,7 +40,12 @@ func (args *GetBlockByHashArgs) UnmarshalJSON(b []byte) (err error) {
|
|||||||
if len(obj) < 1 {
|
if len(obj) < 1 {
|
||||||
return errArguments
|
return errArguments
|
||||||
}
|
}
|
||||||
args.BlockHash = obj[0].(string)
|
|
||||||
|
argstr, ok := obj[0].(string)
|
||||||
|
if !ok {
|
||||||
|
return errDecodeArgs
|
||||||
|
}
|
||||||
|
args.BlockHash = argstr
|
||||||
|
|
||||||
if len(obj) > 1 {
|
if len(obj) > 1 {
|
||||||
args.Transactions = obj[1].(bool)
|
args.Transactions = obj[1].(bool)
|
||||||
|
Loading…
Reference in New Issue
Block a user