aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorlaanwj <126646+laanwj@users.noreply.github.com>2022-06-07 19:21:28 +0200
committerlaanwj <126646+laanwj@users.noreply.github.com>2022-06-07 19:42:13 +0200
commitd8ae5044488248d5eb134aa7c0a15c813a2f8715 (patch)
treeeb9ffbb1474f5291139985e72d6bd71b34355447 /src
parent45d8b1e94a8e3e68f210d496330f5e16219d2a8d (diff)
parentfa243e93138d899f41be02af3fa2b029dd8d525e (diff)
downloadbitcoin-d8ae5044488248d5eb134aa7c0a15c813a2f8715.tar.xz
Merge bitcoin/bitcoin#25245: refactor: Remove no-op TIME_INIT on deser
fa243e93138d899f41be02af3fa2b029dd8d525e 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 fa243e93138d899f41be02af3fa2b029dd8d525e fanquake: ACK fa243e93138d899f41be02af3fa2b029dd8d525e Tree-SHA512: 3b92578a291279d04ac1b274807a6e4ee7a342e3527cc03d90223a1dbc4961668ddb572e40aff85171600a5a3cb2572188c0d75f757a3db8a441c1103eb66e84
Diffstat (limited to 'src')
-rw-r--r--src/bitcoin-util.cpp1
-rw-r--r--src/protocol.h8
2 files changed, 2 insertions, 7 deletions
diff --git a/src/bitcoin-util.cpp b/src/bitcoin-util.cpp
index a2f3fca26c..1aeac3cef0 100644
--- a/src/bitcoin-util.cpp
+++ b/src/bitcoin-util.cpp
@@ -15,6 +15,7 @@
#include <streams.h>
#include <util/system.h>
#include <util/translation.h>
+#include <version.h>
#include <atomic>
#include <cstdio>
diff --git a/src/protocol.h b/src/protocol.h
index fdeaa9a9c5..da2d24aff3 100644
--- a/src/protocol.h
+++ b/src/protocol.h
@@ -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) {