Skip to content

Commit d8ae504

Browse files
committed
Merge bitcoin/bitcoin#25245: refactor: Remove no-op TIME_INIT on deser
fa243e9 Remove no-op TIME_INIT on deser (MarcoFalke) Pull request description: Split out from bitcoin/bitcoin#24697 ACKs for top commit: laanwj: ACK fa243e9 fanquake: ACK fa243e9 Tree-SHA512: 3b92578a291279d04ac1b274807a6e4ee7a342e3527cc03d90223a1dbc4961668ddb572e40aff85171600a5a3cb2572188c0d75f757a3db8a441c1103eb66e84
2 parents 45d8b1e + fa243e9 commit d8ae504

File tree

2 files changed

+2
-7
lines changed

2 files changed

+2
-7
lines changed

src/bitcoin-util.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
#include <streams.h>
1616
#include <util/system.h>
1717
#include <util/translation.h>
18+
#include <version.h>
1819

1920
#include <atomic>
2021
#include <cstdio>

src/protocol.h

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,6 @@
33
// Distributed under the MIT software license, see the accompanying
44
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
55

6-
#ifndef __cplusplus
7-
#error This header can only be compiled as C++.
8-
#endif
9-
106
#ifndef BITCOIN_PROTOCOL_H
117
#define BITCOIN_PROTOCOL_H
128

@@ -15,10 +11,9 @@
1511
#include <serialize.h>
1612
#include <streams.h>
1713
#include <uint256.h>
18-
#include <version.h>
1914

15+
#include <cstdint>
2016
#include <limits>
21-
#include <stdint.h>
2217
#include <string>
2318

2419
/** Message header.
@@ -420,7 +415,6 @@ class CAddress : public CService
420415
use_v2 = s.GetVersion() & ADDRV2_FORMAT;
421416
}
422417

423-
SER_READ(obj, obj.nTime = TIME_INIT);
424418
READWRITE(obj.nTime);
425419
// nServices is serialized as CompactSize in V2; as uint64_t in V1.
426420
if (use_v2) {

0 commit comments

Comments
 (0)