[protocol] Remove unused CADDR_TIME_VERSION

Add comments to CAddress serialization code explaining why
it's no longer needed.
This commit is contained in:
John Newbery
2020-07-10 16:48:20 +01:00
parent c0b0b0240f
commit 37a934e6b3
3 changed files with 15 additions and 11 deletions

View File

@@ -371,7 +371,13 @@ public:
READWRITE(nVersion);
}
if ((s.GetType() & SER_DISK) ||
(nVersion >= CADDR_TIME_VERSION && !(s.GetType() & SER_GETHASH))) {
(nVersion != INIT_PROTO_VERSION && !(s.GetType() & SER_GETHASH))) {
// The only time we serialize a CAddress object without nTime is in
// the initial VERSION messages which contain two CAddress records.
// At that point, the serialization version is INIT_PROTO_VERSION.
// After the version handshake, serialization version is >=
// MIN_PEER_PROTO_VERSION and all ADDR messages are serialized with
// nTime.
READWRITE(obj.nTime);
}
READWRITE(Using<CustomUintFormatter<8>>(obj.nServices));