mirror of
https://github.com/monero-project/monero.git
synced 2025-08-07 23:42:22 -04:00
[fix] Network 1.8: unlimited the RPC connections
works for unit tests build, too
This commit is contained in:
parent
cbddb5f690
commit
9bfa593eee
6 changed files with 134 additions and 60 deletions
|
@ -94,6 +94,18 @@ namespace epee
|
|||
namespace net_utils
|
||||
{
|
||||
|
||||
std::string to_string(t_connection_type type)
|
||||
{
|
||||
if (type == e_connection_type_NET)
|
||||
return std::string("NET");
|
||||
else if (type == e_connection_type_RPC)
|
||||
return std::string("RPC");
|
||||
else if (type == e_connection_type_P2P)
|
||||
return std::string("P2P");
|
||||
|
||||
return std::string("UNKNOWN");
|
||||
}
|
||||
|
||||
|
||||
/* ============================================================================ */
|
||||
|
||||
|
|
|
@ -75,6 +75,14 @@ namespace net_utils
|
|||
|
||||
class connection_basic_pimpl; // PIMPL for this class
|
||||
|
||||
enum t_connection_type { // type of the connection (of this server), e.g. so that we will know how to limit it
|
||||
e_connection_type_NET = 0, // default (not used?)
|
||||
e_connection_type_RPC = 1, // the rpc commands (probably not rate limited, not chunked, etc)
|
||||
e_connection_type_P2P = 2 // to other p2p node (probably limited)
|
||||
};
|
||||
|
||||
std::string to_string(t_connection_type type);
|
||||
|
||||
class connection_basic { // not-templated base class for rapid developmet of some code parts
|
||||
public:
|
||||
std::unique_ptr< connection_basic_pimpl > mI; // my Implementation
|
||||
|
|
|
@ -84,7 +84,8 @@ namespace nodetool
|
|||
:m_payload_handler(payload_handler),
|
||||
m_allow_local_ip(false),
|
||||
m_no_igd(false),
|
||||
m_hide_my_port(false)
|
||||
m_hide_my_port(false),
|
||||
m_net_server( epee::net_utils::e_connection_type_P2P ) // this is a P2P connection of the main p2p node server, because this is class node_server<>
|
||||
{
|
||||
m_current_number_of_out_peers = 0;
|
||||
m_save_graph = false;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue