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

#include <p2p_protocol_defs.h>

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

Public Member Functions

 if (is_store)
 

Public Attributes

uint64_t local_time
 
t_playload_type payload_data
 
std::vector< peerlist_entrylocal_peerlist_new
 

Detailed Description

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

Definition at line 265 of file p2p_protocol_defs.h.

Member Function Documentation

◆ if()

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

Definition at line 274 of file p2p_protocol_defs.h.

275  {
276  // saving: save both, so old and new peers can understand it
278  std::vector<peerlist_entry_base<network_address_old>> local_peerlist;
279  for (const auto &p: this_ref.local_peerlist_new)
280  {
281  if (p.adr.get_type_id() == epee::net_utils::ipv4_network_address::get_type_id())
282  {
283  const epee::net_utils::network_address &na = p.adr;
285  local_peerlist.push_back(peerlist_entry_base<network_address_old>({{ipv4.ip(), ipv4.port()}, p.id, p.last_seen}));
286  }
287  else
288  MDEBUG("Not including in legacy peer list: " << p.adr.str());
289  }
290  epee::serialization::selector<is_store>::serialize_stl_container_pod_val_as_blob(local_peerlist, stg, hparent_section, "local_peerlist");
291  }
#define KV_SERIALIZE(varialble)
#define MDEBUG(x)
Definition: misc_log_ex.h:76
std::vector< peerlist_entry > local_peerlist_new
static constexpr address_type get_type_id() noexcept
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_TIMED_SYNC_T< t_playload_type >::response_t::local_peerlist_new

Definition at line 269 of file p2p_protocol_defs.h.

◆ local_time

template<class t_playload_type >
uint64_t nodetool::COMMAND_TIMED_SYNC_T< t_playload_type >::response_t::local_time

Definition at line 267 of file p2p_protocol_defs.h.

◆ payload_data

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

Definition at line 268 of file p2p_protocol_defs.h.


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