aboutsummaryrefslogtreecommitdiff
path: root/src/interfaces
diff options
context:
space:
mode:
authorRussell Yanofsky <russ@yanofsky.org>2017-07-28 22:50:07 -0400
committerRussell Yanofsky <russ@yanofsky.org>2019-02-22 15:43:02 -0400
commit00dfb2a440b94a24b61cafb519fb122f6a0ae176 (patch)
tree203e03944bd1a1975671bf2faa0f16b6cf0d22eb /src/interfaces
parentcc3836e8f90894432db06d9de6b20eac53d93cbe (diff)
Remove uses of g_connman in wallet code
This commit does not change behavior.
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