diff options
author | Lee Clagett <code@leeclagett.com> | 2020-05-29 22:08:19 -0400 |
---|---|---|
committer | Lee Clagett <code@leeclagett.com> | 2020-08-14 19:46:59 +0000 |
commit | 60627c9f24f5c322c59abee7c8e9e03a2b2ccf5a (patch) | |
tree | a0dee7bae6708f24732aa8ed0e3da39de4729a8f /src/rpc/zmq_server.cpp | |
parent | Fix pruned tx for ZMQ's GetBlocksFast (diff) | |
download | monero-60627c9f24f5c322c59abee7c8e9e03a2b2ccf5a.tar.xz |
Switch to insitu parsing for ZMQ-JSON; GetBlocksFast reads 13%+ faster
Diffstat (limited to '')
-rw-r--r-- | src/rpc/zmq_server.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/rpc/zmq_server.cpp b/src/rpc/zmq_server.cpp index 6105b7f3a..4028df96a 100644 --- a/src/rpc/zmq_server.cpp +++ b/src/rpc/zmq_server.cpp @@ -158,9 +158,9 @@ void ZmqServer::serve() if (!pub || sockets[2].revents) { - const std::string message = MONERO_UNWRAP(net::zmq::receive(rep.get(), read_flags)); + std::string message = MONERO_UNWRAP(net::zmq::receive(rep.get(), read_flags)); MDEBUG("Received RPC request: \"" << message << "\""); - epee::byte_slice response = handler.handle(message); + epee::byte_slice response = handler.handle(std::move(message)); const boost::string_ref response_view{reinterpret_cast<const char*>(response.data()), response.size()}; MDEBUG("Sending RPC reply: \"" << response_view << "\""); |