aboutsummaryrefslogtreecommitdiff
path: root/src/interfaces
diff options
context:
space:
mode:
Diffstat (limited to 'src/interfaces')
-rw-r--r--src/interfaces/chain.cpp2
-rw-r--r--src/interfaces/chain.h3
2 files changed, 5 insertions, 0 deletions
diff --git a/src/interfaces/chain.cpp b/src/interfaces/chain.cpp
index bb2af5b8ba..8493c5de70 100644
--- a/src/interfaces/chain.cpp
+++ b/src/interfaces/chain.cpp
@@ -6,6 +6,7 @@
#include <chain.h>
#include <chainparams.h>
+#include <net.h>
#include <policy/fees.h>
#include <policy/policy.h>
#include <policy/rbf.h>
@@ -229,6 +230,7 @@ public:
return ::mempool.GetMinFee(gArgs.GetArg("-maxmempool", DEFAULT_MAX_MEMPOOL_SIZE) * 1000000);
}
bool getPruneMode() override { return ::fPruneMode; }
+ bool p2pEnabled() override { return g_connman != nullptr; }
};
} // namespace
diff --git a/src/interfaces/chain.h b/src/interfaces/chain.h
index 96e4f8cf0b..44a0b1743e 100644
--- a/src/interfaces/chain.h
+++ b/src/interfaces/chain.h
@@ -158,6 +158,9 @@ public:
//! Check if pruning is enabled.
virtual bool getPruneMode() = 0;
+
+ //! Check if p2p enabled.
+ virtual bool p2pEnabled() = 0;
};
//! Interface to let node manage chain clients (wallets, or maybe tools for