|
|
@ -97,8 +97,8 @@ func makeJSONRPCHandler(funcMap map[string]*RPCFunc, logger log.Logger) http.Han |
|
|
|
} |
|
|
|
args = append(args, fnArgs...) |
|
|
|
} |
|
|
|
|
|
|
|
returns := rpcFunc.f.Call(args) |
|
|
|
logger.Debug("HTTPJSONRPC", "method", request.Method, "args", args, "returns", returns) |
|
|
|
result, err := unreflectResult(returns) |
|
|
|
if err != nil { |
|
|
|
responses = append(responses, types.RPCInternalError(request.ID, err)) |
|
|
@ -106,6 +106,7 @@ func makeJSONRPCHandler(funcMap map[string]*RPCFunc, logger log.Logger) http.Han |
|
|
|
} |
|
|
|
responses = append(responses, types.NewRPCSuccessResponse(request.ID, result)) |
|
|
|
} |
|
|
|
|
|
|
|
if len(responses) > 0 { |
|
|
|
WriteRPCResponseHTTP(w, responses...) |
|
|
|
} |
|
|
|