From e45619e61e4831eea70a43fe6985f4d57ea02e9e Mon Sep 17 00:00:00 2001 From: luigi1111 Date: Fri, 16 Apr 2021 13:52:44 -0500 Subject: Revert "Merge pull request #7136" This reverts commit 63c7ca07fba2f063c760f786a986fb3e02fb040e, reversing changes made to 2218e23e84a89e9a1e4c0be5d50f891ab836754f. --- src/p2p/net_node_common.h | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'src/p2p/net_node_common.h') diff --git a/src/p2p/net_node_common.h b/src/p2p/net_node_common.h index 92b7596ae..0da758ad4 100644 --- a/src/p2p/net_node_common.h +++ b/src/p2p/net_node_common.h @@ -40,8 +40,6 @@ #include "net/net_utils_base.h" #include "p2p_protocol_defs.h" -namespace epee { namespace levin { class message_writer; } } - namespace nodetool { @@ -51,9 +49,10 @@ namespace nodetool template struct i_p2p_endpoint { - virtual bool relay_notify_to_list(int command, epee::levin::message_writer message, std::vector> connections)=0; + virtual bool relay_notify_to_list(int command, const epee::span data_buff, std::vector> connections)=0; virtual epee::net_utils::zone send_txs(std::vector txs, const epee::net_utils::zone origin, const boost::uuids::uuid& source, cryptonote::relay_method tx_relay)=0; - virtual bool invoke_notify_to_peer(int command, epee::levin::message_writer message, const epee::net_utils::connection_context_base& context)=0; + virtual bool invoke_command_to_peer(int command, const epee::span req_buff, std::string& resp_buff, const epee::net_utils::connection_context_base& context)=0; + virtual bool invoke_notify_to_peer(int command, const epee::span req_buff, const epee::net_utils::connection_context_base& context)=0; virtual bool drop_connection(const epee::net_utils::connection_context_base& context)=0; virtual void request_callback(const epee::net_utils::connection_context_base& context)=0; virtual uint64_t get_public_connections_count()=0; @@ -72,7 +71,7 @@ namespace nodetool template struct p2p_endpoint_stub: public i_p2p_endpoint { - virtual bool relay_notify_to_list(int command, epee::levin::message_writer message, std::vector> connections) + virtual bool relay_notify_to_list(int command, const epee::span data_buff, std::vector> connections) { return false; } @@ -80,7 +79,11 @@ namespace nodetool { return epee::net_utils::zone::invalid; } - virtual bool invoke_notify_to_peer(int command, epee::levin::message_writer message, const epee::net_utils::connection_context_base& context) + virtual bool invoke_command_to_peer(int command, const epee::span req_buff, std::string& resp_buff, const epee::net_utils::connection_context_base& context) + { + return false; + } + virtual bool invoke_notify_to_peer(int command, const epee::span req_buff, const epee::net_utils::connection_context_base& context) { return true; } -- cgit v1.2.3