Electroneum
nodetool::COMMAND_HANDSHAKE_T< t_playload_type >::response_t Struct Reference

#include <p2p_protocol_defs.h>

Collaboration diagram for nodetool::COMMAND_HANDSHAKE_T< t_playload_type >::response_t:

Public Member Functions

 if (is_store)
 

Public Attributes

basic_node_data node_data
 
t_playload_type payload_data
 
std::vector< peerlist_entrylocal_peerlist_new
 

Detailed Description

template<class t_playload_type>
struct nodetool::COMMAND_HANDSHAKE_T< t_playload_type >::response_t

Definition at line 204 of file p2p_protocol_defs.h.

Member Function Documentation

◆ if()

template<class t_playload_type >
nodetool::COMMAND_HANDSHAKE_T< t_playload_type >::response_t::if ( is_store  )
inline

Definition at line 213 of file p2p_protocol_defs.h.

214  {
215  // saving: save both, so old and new peers can understand it
217  std::vector<peerlist_entry_base<network_address_old>> local_peerlist;
218  for (const auto &p: this_ref.local_peerlist_new)
219  {
220  if (p.adr.get_type_id() == epee::net_utils::ipv4_network_address::get_type_id())
221  {
222  const epee::net_utils::network_address &na = p.adr;
224  local_peerlist.push_back(peerlist_entry_base<network_address_old>({{ipv4.ip(), ipv4.port()}, p.id, p.last_seen, p.pruning_seed, p.rpc_port}));
225  }
226  else
227  MDEBUG("Not including in legacy peer list: " << p.adr.str());
228  }
229  epee::serialization::selector<is_store>::serialize_stl_container_pod_val_as_blob(local_peerlist, stg, hparent_section, "local_peerlist");
230  }
#define KV_SERIALIZE(varialble)
#define MDEBUG(x)
Definition: misc_log_ex.h:76
static constexpr address_type get_type_id() noexcept
std::vector< peerlist_entry > local_peerlist_new
Here is the call graph for this function:

Member Data Documentation

◆ local_peerlist_new

template<class t_playload_type >
std::vector<peerlist_entry> nodetool::COMMAND_HANDSHAKE_T< t_playload_type >::response_t::local_peerlist_new

Definition at line 208 of file p2p_protocol_defs.h.

◆ node_data

template<class t_playload_type >
basic_node_data nodetool::COMMAND_HANDSHAKE_T< t_playload_type >::response_t::node_data

Definition at line 206 of file p2p_protocol_defs.h.

◆ payload_data

template<class t_playload_type >
t_playload_type nodetool::COMMAND_HANDSHAKE_T< t_playload_type >::response_t::payload_data

Definition at line 207 of file p2p_protocol_defs.h.


The documentation for this struct was generated from the following file: