rebase session

This commit is contained in:
Nathan Nichols
2021-05-26 13:46:18 -05:00
parent 4a35222fca
commit 262cadf514
16 changed files with 336 additions and 166 deletions

View File

@@ -16,6 +16,10 @@ buildResponse(
std::string command = request.at("command").as_string().c_str();
BOOST_LOG_TRIVIAL(info) << "Received rpc command : " << request;
boost::json::object response;
if (forwardCommands.find(command) != forwardCommands.end())
return etl.getETLLoadBalancer().forwardToP2p(request);
switch (commandMap[command])
{
case tx:
@@ -53,7 +57,7 @@ buildResponse(
case unsubscribe:
return doUnsubscribe(request, session, manager);
default:
BOOST_LOG_TRIVIAL(error) << "Unknown command: " << command;
response["error"] = "Unknown command: " + command;
return response;
}
return response;
}