mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-11 14:38:29 +01:00
[protocol] Remove unused CADDR_TIME_VERSION
Add comments to CAddress serialization code explaining why it's no longer needed.
This commit is contained in:
@@ -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));
|
||||
|
||||
Reference in New Issue
Block a user