Merge bitcoin/bitcoin#25245: refactor: Remove no-op TIME_INIT on deser

fa243e9313 Remove no-op TIME_INIT on deser (MarcoFalke)

Pull request description:

  Split out from https://github.com/bitcoin/bitcoin/pull/24697

ACKs for top commit:
  laanwj:
    ACK fa243e9313
  fanquake:
    ACK fa243e9313

Tree-SHA512: 3b92578a291279d04ac1b274807a6e4ee7a342e3527cc03d90223a1dbc4961668ddb572e40aff85171600a5a3cb2572188c0d75f757a3db8a441c1103eb66e84
This commit is contained in:
laanwj 2022-06-07 19:21:28 +02:00
commit d8ae504448
No known key found for this signature in database
GPG key ID: 1E4AED62986CD25D
2 changed files with 2 additions and 7 deletions

View file

@ -15,6 +15,7 @@
#include <streams.h>
#include <util/system.h>
#include <util/translation.h>
#include <version.h>
#include <atomic>
#include <cstdio>

View file

@ -3,10 +3,6 @@
// Distributed under the MIT software license, see the accompanying
// 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
#define BITCOIN_PROTOCOL_H
@ -15,10 +11,9 @@
#include <serialize.h>
#include <streams.h>
#include <uint256.h>
#include <version.h>
#include <cstdint>
#include <limits>
#include <stdint.h>
#include <string>
/** Message header.
@ -420,7 +415,6 @@ public:
use_v2 = s.GetVersion() & ADDRV2_FORMAT;
}
SER_READ(obj, obj.nTime = TIME_INIT);
READWRITE(obj.nTime);
// nServices is serialized as CompactSize in V2; as uint64_t in V1.
if (use_v2) {