Merge pull request #5275 from xgswust/lotout-state-call

lotus state call will panic
This commit is contained in:
Łukasz Magiera 2021-01-08 21:40:11 +01:00 committed by GitHub
commit afb9e5f672
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1617,7 +1617,7 @@ func parseParamsForMethod(act cid.Cid, method uint64, args []string) ([]byte, er
return nil, fmt.Errorf("unknown method %d for actor %s", method, act)
}
paramObj := methodMeta.Params
paramObj := methodMeta.Params.Elem()
if paramObj.NumField() != len(args) {
return nil, fmt.Errorf("not enough arguments given to call that method (expecting %d)", paramObj.NumField())
}