aboutsummaryrefslogtreecommitdiff
path: root/src/net.h
diff options
context:
space:
mode:
authorbrunoerg <brunoely.gc@gmail.com>2023-11-28 12:36:47 -0300
committerbrunoerg <brunoely.gc@gmail.com>2024-02-28 10:04:18 -0300
commit2863d7dddb62d987b3e1c3b8bfad7083f0f774b2 (patch)
tree78fa4fb9e408c6c1d1666458493913d52694232e /src/net.h
parent801ef07ebd72fcd6544dcfb60536efd3a88178c1 (diff)
downloadbitcoin-2863d7dddb62d987b3e1c3b8bfad7083f0f774b2.tar.xz
net: store `-whitelist{force}relay` values in `CConnman`
Diffstat (limited to 'src/net.h')
-rw-r--r--src/net.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/net.h b/src/net.h
index e78e122c44..70abdbaaf8 100644
--- a/src/net.h
+++ b/src/net.h
@@ -1064,6 +1064,8 @@ public:
std::vector<std::string> m_specified_outgoing;
std::vector<std::string> m_added_nodes;
bool m_i2p_accept_incoming;
+ bool whitelist_forcerelay = DEFAULT_WHITELISTFORCERELAY;
+ bool whitelist_relay = DEFAULT_WHITELISTRELAY;
};
void Init(const Options& connOptions) EXCLUSIVE_LOCKS_REQUIRED(!m_added_nodes_mutex, !m_total_bytes_sent_mutex)
@@ -1098,6 +1100,8 @@ public:
}
}
m_onion_binds = connOptions.onion_binds;
+ whitelist_forcerelay = connOptions.whitelist_forcerelay;
+ whitelist_relay = connOptions.whitelist_relay;
}
CConnman(uint64_t seed0, uint64_t seed1, AddrMan& addrman, const NetGroupManager& netgroupman,
@@ -1552,6 +1556,18 @@ private:
std::vector<CService> m_onion_binds;
/**
+ * flag for adding 'forcerelay' permission to whitelisted inbound
+ * and manual peers with default permissions.
+ */
+ bool whitelist_forcerelay;
+
+ /**
+ * flag for adding 'relay' permission to whitelisted inbound
+ * and manual peers with default permissions.
+ */
+ bool whitelist_relay;
+
+ /**
* Mutex protecting m_i2p_sam_sessions.
*/
Mutex m_unused_i2p_sessions_mutex;