mirror of
https://github.com/Retropex/bitcoin.git
synced 2025-05-29 13:32:33 +02:00
net: store -whitelist{force}relay
values in CConnman
Github-Pull: #27114
Rebased-From: 2863d7dddb
This commit is contained in:
parent
43b9920571
commit
7076169c8c
@ -1764,6 +1764,8 @@ bool AppInitMain(NodeContext& node, interfaces::BlockAndHeaderTipInfo* tip_info)
|
|||||||
connOptions.m_added_nodes = args.GetArgs("-addnode");
|
connOptions.m_added_nodes = args.GetArgs("-addnode");
|
||||||
connOptions.nMaxOutboundLimit = *opt_max_upload;
|
connOptions.nMaxOutboundLimit = *opt_max_upload;
|
||||||
connOptions.m_peer_connect_timeout = peer_connect_timeout;
|
connOptions.m_peer_connect_timeout = peer_connect_timeout;
|
||||||
|
connOptions.whitelist_forcerelay = args.GetBoolArg("-whitelistforcerelay", DEFAULT_WHITELISTFORCERELAY);
|
||||||
|
connOptions.whitelist_relay = args.GetBoolArg("-whitelistrelay", DEFAULT_WHITELISTRELAY);
|
||||||
|
|
||||||
// Port to bind to if `-bind=addr` is provided without a `:port` suffix.
|
// Port to bind to if `-bind=addr` is provided without a `:port` suffix.
|
||||||
const uint16_t default_bind_port =
|
const uint16_t default_bind_port =
|
||||||
|
16
src/net.h
16
src/net.h
@ -1069,6 +1069,8 @@ public:
|
|||||||
std::vector<std::string> m_specified_outgoing;
|
std::vector<std::string> m_specified_outgoing;
|
||||||
std::vector<std::string> m_added_nodes;
|
std::vector<std::string> m_added_nodes;
|
||||||
bool m_i2p_accept_incoming;
|
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)
|
void Init(const Options& connOptions) EXCLUSIVE_LOCKS_REQUIRED(!m_added_nodes_mutex, !m_total_bytes_sent_mutex)
|
||||||
@ -1103,6 +1105,8 @@ public:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
m_onion_binds = connOptions.onion_binds;
|
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,
|
CConnman(uint64_t seed0, uint64_t seed1, AddrMan& addrman, const NetGroupManager& netgroupman,
|
||||||
@ -1539,6 +1543,18 @@ private:
|
|||||||
*/
|
*/
|
||||||
std::vector<CService> m_onion_binds;
|
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 protecting m_i2p_sam_sessions.
|
||||||
*/
|
*/
|
||||||
|
Loading…
Reference in New Issue
Block a user