HomePhabricator

src/netbase.h: Fix endian in CNetAddr serialization
aac320537523Unpublished

Unpublished Commit ยท Learn More

Repository Importing: This repository is still importing.

Description

src/netbase.h: Fix endian in CNetAddr serialization

We've chosen to htons/ntohs explicitly on reading and writing
(I do not know why). But as READWRITE already does an endian swap
on big endian, this means the port number gets switched around,
which was what we were trying to avoid in the first place. So
to make this compatible, serialize it as FLATDATA.

Details

Provenance
Wladimir J. van der Laan <laanwj@gmail.com>Authored on Dec 18 2014, 21:07
schancelPushed on Jan 5 2018, 21:58
schancelPushed on Jan 5 2018, 21:39
schancelPushed on Jan 5 2018, 21:17
Parents
rSTAGING01f9c3449a88: src/serialize.h: base serialization level endianness neutrality
Branches
Unknown
Tags
Unknown

Event Timeline

Wladimir J. van der Laan <laanwj@gmail.com> committed rSTAGINGaac320537523: src/netbase.h: Fix endian in CNetAddr serialization (authored by Wladimir J. van der Laan <laanwj@gmail.com>).Mar 6 2015, 16:21