aboutsummaryrefslogtreecommitdiff
path: root/src/net.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/net.h')
-rw-r--r--src/net.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/net.h b/src/net.h
index 4834050122..444a1ceed2 100644
--- a/src/net.h
+++ b/src/net.h
@@ -789,6 +789,21 @@ public:
std::atomic_bool fPauseRecv{false};
std::atomic_bool fPauseSend{false};
+ bool IsOutboundOrBlockRelayConn() const {
+ switch(m_conn_type) {
+ case ConnectionType::OUTBOUND:
+ case ConnectionType::BLOCK_RELAY:
+ return true;
+ case ConnectionType::INBOUND:
+ case ConnectionType::MANUAL:
+ case ConnectionType::ADDR_FETCH:
+ case ConnectionType::FEELER:
+ return false;
+ }
+
+ assert(false);
+ }
+
bool IsFullOutboundConn() const {
return m_conn_type == ConnectionType::OUTBOUND;
}