| 40 | } |
| 41 | } |
| 42 | void RpcProtocolServerV2::HandleBatchRequest(const Json::Value &req, Json::Value &response) { |
| 43 | if (req.empty()) |
| 44 | this->WrapError(Json::nullValue, Errors::ERROR_RPC_INVALID_REQUEST, Errors::GetErrorMessage(Errors::ERROR_RPC_INVALID_REQUEST), response); |
| 45 | else { |
| 46 | for (unsigned int i = 0; i < req.size(); i++) { |
| 47 | Json::Value result; |
| 48 | this->HandleSingleRequest(req[i], result); |
| 49 | if (result != Json::nullValue) |
| 50 | response.append(result); |
| 51 | } |
| 52 | } |
| 53 | } |
| 54 | bool RpcProtocolServerV2::ValidateRequestFields(const Json::Value &request) { |
| 55 | if (!request.isObject()) |
| 56 | return false; |
no test coverage detected