During CAddress
deserialization we use nVersion
to decide whether to
use CompactSize format for nServices
. However, that variable nVersion
is first assigned s.GetVersion()
and is later overwritten with
whatever is coming from disk by READWRITE(nVersion)
.
We should use s.GetVersion()
instead, which is also used by
READWRITEAS(CService, obj);
, called at the end of CAddress
deserialization.