merge bitcoin#25245: Remove no-op TIME_INIT on deser

This commit is contained in:
Kittywhiskers Van Gogh 2024-12-07 18:41:59 +00:00
parent 2d33cfba41
commit ea3c727e02
No known key found for this signature in database
GPG Key ID: 30CD0C065E5C4AAD

View File

@ -3,10 +3,6 @@
// Distributed under the MIT software license, see the accompanying // Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php. // file COPYING or http://www.opensource.org/licenses/mit-license.php.
#ifndef __cplusplus
#error This header can only be compiled as C++.
#endif
#ifndef BITCOIN_PROTOCOL_H #ifndef BITCOIN_PROTOCOL_H
#define BITCOIN_PROTOCOL_H #define BITCOIN_PROTOCOL_H
@ -15,13 +11,10 @@
#include <serialize.h> #include <serialize.h>
#include <streams.h> #include <streams.h>
#include <uint256.h> #include <uint256.h>
#include <version.h>
#include <util/expected.h> #include <util/expected.h>
#include <cstdint>
#include <limits> #include <limits>
#include <stdint.h>
#include <string> #include <string>
/** Message header. /** Message header.
@ -467,7 +460,6 @@ public:
use_v2 = s.GetVersion() & ADDRV2_FORMAT; use_v2 = s.GetVersion() & ADDRV2_FORMAT;
} }
SER_READ(obj, obj.nTime = TIME_INIT);
READWRITE(obj.nTime); READWRITE(obj.nTime);
// nServices is serialized as CompactSize in V2; as uint64_t in V1. // nServices is serialized as CompactSize in V2; as uint64_t in V1.
if (use_v2) { if (use_v2) {