aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/init.cpp2
-rw-r--r--src/net.cpp1
-rw-r--r--src/net.h6
-rw-r--r--src/rpc/net.cpp1
-rw-r--r--src/test/fuzz/connman.cpp1
5 files changed, 7 insertions, 4 deletions
diff --git a/src/init.cpp b/src/init.cpp
index d5c3acbaad..22c0d928b5 100644
--- a/src/init.cpp
+++ b/src/init.cpp
@@ -1561,7 +1561,7 @@ bool AppInitMain(NodeContext& node, interfaces::BlockAndHeaderTipInfo* tip_info)
const CBlockIndex* tip = chainstate->m_chain.Tip();
RPCNotifyBlockChange(tip);
- if (tip && tip->nTime > GetAdjustedTime() + 2 * 60 * 60) {
+ if (tip && tip->nTime > GetTime() + MAX_FUTURE_BLOCK_TIME) {
strLoadError = _("The block database contains a block which appears to be from the future. "
"This may be due to your computer's date and time being set incorrectly. "
"Only rebuild the block database if you are sure that your computer's date and time are correct");
diff --git a/src/net.cpp b/src/net.cpp
index e17db7e54b..f6d40a7854 100644
--- a/src/net.cpp
+++ b/src/net.cpp
@@ -10,6 +10,7 @@
#include <net.h>
#include <addrdb.h>
+#include <addrman.h>
#include <banman.h>
#include <clientversion.h>
#include <compat.h>
diff --git a/src/net.h b/src/net.h
index dd5cc66a04..e9baa57a9b 100644
--- a/src/net.h
+++ b/src/net.h
@@ -6,7 +6,6 @@
#ifndef BITCOIN_NET_H
#define BITCOIN_NET_H
-#include <addrman.h>
#include <chainparams.h>
#include <common/bloom.h>
#include <compat.h>
@@ -37,9 +36,10 @@
#include <thread>
#include <vector>
-class CScheduler;
-class CNode;
+class AddrMan;
class BanMan;
+class CNode;
+class CScheduler;
struct bilingual_str;
/** Default for -whitelistrelay. */
diff --git a/src/rpc/net.cpp b/src/rpc/net.cpp
index e33f1ce4a3..f4456bebc5 100644
--- a/src/rpc/net.cpp
+++ b/src/rpc/net.cpp
@@ -4,6 +4,7 @@
#include <rpc/server.h>
+#include <addrman.h>
#include <banman.h>
#include <chainparams.h>
#include <clientversion.h>
diff --git a/src/test/fuzz/connman.cpp b/src/test/fuzz/connman.cpp
index b8f4ad8d94..f87b6f1503 100644
--- a/src/test/fuzz/connman.cpp
+++ b/src/test/fuzz/connman.cpp
@@ -2,6 +2,7 @@
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
+#include <addrman.h>
#include <chainparams.h>
#include <chainparamsbase.h>
#include <net.h>