The test feature_addrman.py
currently serializes the addrdb without specifying endianness for int
s, so the machine’s native byte order is used (see https://docs.python.org/3/library/struct.html#byte-order-size-and-alignment) and the generated peers.dat
would be invalid on big-endian systems (our internal (de)serializers always use little-endian, see ser_{read,write}data32
). Fix this by explicitly specifying little-endian serialization via the <
character in struct.pack(...)
.
This is not detected by CI as we unfortunately don’t run functional tests on big-endian systems there (I think we definitely should!).