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 std::size_t buffer_size() noexcept
constexpr uint16_t port() const noexcept
b32 i2p address; internal format not condensed/decoded.
static const char * unknown_str() noexcept
static const char * unknown_str() noexcept
#define CRYPTONOTE_PRUNING_LOG_STRIPES
static i2p_address unknown() noexcept
static tor_address unknown() noexcept
void save(Archive &a, const net::i2p_address &na, const ver_type)
const char * host_str() const noexcept
static constexpr std::size_t buffer_size() noexcept
address_type get_type_id() const
bool serialize(Archive &ar, T &v)
constexpr uint32_t ip() const noexcept
static constexpr address_type get_type_id() noexcept
BOOST_CLASS_VERSION(nodetool::node_server< cryptonote::t_cryptonote_protocol_handler< tests::proxy_core > >, 1)
const char * host_str() const noexcept
static constexpr epee::net_utils::address_type get_type_id() noexcept
std::uint16_t port() const noexcept
boost::endian::big_uint32_t ip
boost::endian::big_uint16_t port
const GenericPointer< typename T::ValueType > T2 T::AllocatorType & a
#define ELECTRONEUM_UNWRAP(...)
const T & move(const T &t)
Tor onion address; internal format not condensed/decoded.
Invalid base32 or length.
static expect< i2p_address > make(boost::string_ref address, std::uint16_t default_port=0)
static constexpr epee::net_utils::address_type get_type_id() noexcept
#define ELECTRONEUM_THROW(code, msg)
void do_serialize(boost::mpl::true_, Archive &a, const epee::net_utils::network_address &na)
static expect< tor_address > make(boost::string_ref address, std::uint16_t default_port=0)
std::uint16_t port() const noexcept
void load(Archive &a, net::i2p_address &na, const ver_type)