p2p: unpack memory layout of peerlist entries
The `#pragma pack(push, 1)` directive was causing unaligned memory accesses to shared pointers in `epee::net_utils::network_address`. The peerlist file uses Boost serialization, so this should be backwards compatible.
This commit is contained in:
@@ -54,8 +54,6 @@ namespace nodetool
|
||||
s << std::hex << peer_id;
|
||||
return epee::string_tools::pad_string(s.str(), 16, '0', true);
|
||||
}
|
||||
|
||||
#pragma pack (push, 1)
|
||||
|
||||
struct network_address_old
|
||||
{
|
||||
@@ -139,9 +137,6 @@ namespace nodetool
|
||||
END_SERIALIZE()
|
||||
};
|
||||
typedef connection_entry_base<epee::net_utils::network_address> connection_entry;
|
||||
|
||||
#pragma pack(pop)
|
||||
|
||||
inline
|
||||
std::string print_peerlist_to_string(const std::vector<peerlist_entry>& pl)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user