42 #ifdef CRYPTONOTE_PRUNING_DEBUG_SPOOF_SEED
52 template <
class T,
class Archive>
60 template <
class T,
class Archive>
66 template <
class Archive,
class ver_type>
69 static constexpr
const typename Archive::is_saving is_saving{};
78 do_serialize<epee::net_utils::ipv4_network_address>(is_saving,
a, na);
81 do_serialize<net::tor_address>(is_saving,
a, na);
84 do_serialize<net::i2p_address>(is_saving,
a, na);
88 throw std::runtime_error(
"Unsupported network address type");
91 template <
class Archive,
class ver_type>
98 if (!
typename Archive::is_saving())
102 template <
class Archive,
class ver_type>
105 const size_t length = std::strlen(na.
host_str());
116 template <
class Archive,
class ver_type>
119 const size_t length = std::strlen(na.
host_str());
130 template <
class Archive,
class ver_type>
139 if (length > buffer_size)
142 char host[buffer_size] = {0};
143 a.load_binary(host, length);
144 host[
sizeof(host) - 1] = 0;
152 template <
class Archive,
class ver_type>
161 if (length > buffer_size)
164 char host[buffer_size] = {0};
165 a.load_binary(host, length);
166 host[
sizeof(host) - 1] = 0;
174 template <
class Archive,
class ver_type>
177 boost::serialization::split_free(
a, na, ver);
180 template <
class Archive,
class ver_type>
183 boost::serialization::split_free(
a, na, ver);
186 template <
class Archive,
class ver_type>
194 if (!
typename Archive::is_saving())
199 #ifdef CRYPTONOTE_PRUNING_DEBUG_SPOOF_SEED
200 if (!
typename Archive::is_saving())
207 if (!
typename Archive::is_saving())
214 template <
class Archive,
class ver_type>
static constexpr address_type get_type_id() noexcept
constexpr uint16_t port() const noexcept
constexpr uint32_t ip() const noexcept
address_type get_type_id() const
b32 i2p address; internal format not condensed/decoded.
std::uint16_t port() const noexcept
static i2p_address unknown() noexcept
static constexpr epee::net_utils::address_type get_type_id() noexcept
static constexpr std::size_t buffer_size() noexcept
static expect< i2p_address > make(boost::string_ref address, std::uint16_t default_port=0)
const char * host_str() const noexcept
static const char * unknown_str() noexcept
Tor onion address; internal format not condensed/decoded.
static expect< tor_address > make(boost::string_ref address, std::uint16_t default_port=0)
static constexpr std::size_t buffer_size() noexcept
static const char * unknown_str() noexcept
static constexpr epee::net_utils::address_type get_type_id() noexcept
std::uint16_t port() const noexcept
static tor_address unknown() noexcept
const char * host_str() const noexcept
BOOST_CLASS_VERSION(nodetool::node_server< cryptonote::t_cryptonote_protocol_handler< tests::proxy_core > >, 1)
#define CRYPTONOTE_PRUNING_LOG_STRIPES
#define ELECTRONEUM_UNWRAP(...)
#define ELECTRONEUM_THROW(code, msg)
void load(Archive &a, net::i2p_address &na, const ver_type)
void do_serialize(boost::mpl::true_, Archive &a, const epee::net_utils::network_address &na)
void save(Archive &a, const net::i2p_address &na, const ver_type)
@ invalid_tor_address
Invalid base32 or length.
bool serialize(Archive &ar, T &v)
const T & move(const T &t)
const GenericPointer< typename T::ValueType > T2 T::AllocatorType & a
boost::endian::big_uint16_t port
boost::endian::big_uint32_t ip