From 2863d7dddb62d987b3e1c3b8bfad7083f0f774b2 Mon Sep 17 00:00:00 2001 From: brunoerg Date: Tue, 28 Nov 2023 12:36:47 -0300 Subject: net: store `-whitelist{force}relay` values in `CConnman` --- src/net.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'src/net.h') 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 m_specified_outgoing; std::vector 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, @@ -1551,6 +1555,18 @@ private: */ std::vector 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. */ -- cgit v1.2.3