mirror of
https://github.com/monero-project/monero.git
synced 2025-12-08 16:11:28 +09:00
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:
parent
6bb36309d6
commit
acda1d4a37
@ -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)
|
||||
|
||||
template<typename AddressType>
|
||||
struct peerlist_entry_base
|
||||
@ -108,8 +106,6 @@ namespace nodetool
|
||||
};
|
||||
typedef anchor_peerlist_entry_base<epee::net_utils::network_address> anchor_peerlist_entry;
|
||||
|
||||
#pragma pack(pop)
|
||||
|
||||
inline
|
||||
std::string print_peerlist_to_string(const std::vector<peerlist_entry>& pl)
|
||||
{
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user