Revert "Merge pull request #7136"

This reverts commit 63c7ca07fb, reversing
changes made to 2218e23e84.
This commit is contained in:
luigi1111 2021-04-16 13:52:44 -05:00
parent d544fd0f52
commit e45619e61e
20 changed files with 215 additions and 319 deletions

View file

@ -46,8 +46,6 @@
#include "block_queue.h"
#include "common/perf_timer.h"
#include "cryptonote_basic/connection_context.h"
#include "net/levin_base.h"
#include "p2p/net_node_common.h"
#include <boost/circular_buffer.hpp>
PUSH_WARNINGS
@ -197,11 +195,10 @@ namespace cryptonote
bool post_notify(typename t_parameter::request& arg, cryptonote_connection_context& context)
{
LOG_PRINT_L2("[" << epee::net_utils::print_connection_context_short(context) << "] post " << typeid(t_parameter).name() << " -->");
epee::levin::message_writer out{256 * 1024}; // optimize for block responses
epee::serialization::store_t_to_binary(arg, out.buffer);
epee::byte_slice blob;
epee::serialization::store_t_to_binary(arg, blob, 256 * 1024); // optimize for block responses
//handler_response_blocks_now(blob.size()); // XXX
return m_p2p->invoke_notify_to_peer(t_parameter::ID, std::move(out), context);
return m_p2p->invoke_notify_to_peer(t_parameter::ID, epee::to_span(blob), context);
}
};