aboutsummaryrefslogtreecommitdiff
path: root/src/p2p
diff options
context:
space:
mode:
Diffstat (limited to 'src/p2p')
-rw-r--r--src/p2p/net_node.cpp2
-rw-r--r--src/p2p/net_node.h4
-rw-r--r--src/p2p/net_node.inl19
3 files changed, 9 insertions, 16 deletions
diff --git a/src/p2p/net_node.cpp b/src/p2p/net_node.cpp
index bde6fc88e..c9ca63f43 100644
--- a/src/p2p/net_node.cpp
+++ b/src/p2p/net_node.cpp
@@ -39,7 +39,7 @@ namespace nodetool
, "Port for p2p network protocol"
, std::to_string(config::P2P_DEFAULT_PORT)
, {{ &cryptonote::arg_testnet_on, &cryptonote::arg_stagenet_on }}
- , [](std::array<bool, 2> testnet_stagenet, bool defaulted, std::string val) {
+ , [](std::array<bool, 2> testnet_stagenet, bool defaulted, std::string val)->std::string {
if (testnet_stagenet[0] && defaulted)
return std::to_string(config::testnet::P2P_DEFAULT_PORT);
else if (testnet_stagenet[1] && defaulted)
diff --git a/src/p2p/net_node.h b/src/p2p/net_node.h
index 3010b43ad..4606f66ee 100644
--- a/src/p2p/net_node.h
+++ b/src/p2p/net_node.h
@@ -334,8 +334,8 @@ namespace nodetool
cryptonote::network_type m_nettype;
};
- const int64_t default_limit_up = 2048;
- const int64_t default_limit_down = 8192;
+ const int64_t default_limit_up = 2048; // kB/s
+ const int64_t default_limit_down = 8192; // kB/s
extern const command_line::arg_descriptor<std::string> arg_p2p_bind_ip;
extern const command_line::arg_descriptor<std::string, false, true, 2> arg_p2p_bind_port;
extern const command_line::arg_descriptor<uint32_t> arg_p2p_external_port;
diff --git a/src/p2p/net_node.inl b/src/p2p/net_node.inl
index 54875e619..9b21705ec 100644
--- a/src/p2p/net_node.inl
+++ b/src/p2p/net_node.inl
@@ -49,16 +49,9 @@
#include "storages/levin_abstract_invoke2.h"
#include "cryptonote_core/cryptonote_core.h"
-// We have to look for miniupnpc headers in different places, dependent on if its compiled or external
-#ifdef UPNP_STATIC
- #include <miniupnpc/miniupnpc.h>
- #include <miniupnpc/upnpcommands.h>
- #include <miniupnpc/upnperrors.h>
-#else
- #include "miniupnpc.h"
- #include "upnpcommands.h"
- #include "upnperrors.h"
-#endif
+#include <miniupnp/miniupnpc/miniupnpc.h>
+#include <miniupnp/miniupnpc/upnpcommands.h>
+#include <miniupnp/miniupnpc/upnperrors.h>
#undef MONERO_DEFAULT_LOG_CATEGORY
#define MONERO_DEFAULT_LOG_CATEGORY "net.p2p"
@@ -397,8 +390,8 @@ namespace nodetool
full_addrs.insert("163.172.182.165:18080");
full_addrs.insert("161.67.132.39:18080");
full_addrs.insert("198.74.231.92:18080");
- full_addrs.insert("195.154.123.123:28080");
- full_addrs.insert("212.83.172.165:28080");
+ full_addrs.insert("195.154.123.123:18080");
+ full_addrs.insert("212.83.172.165:18080");
}
return full_addrs;
}
@@ -490,7 +483,7 @@ namespace nodetool
if (result.size())
{
for (const auto& addr_string : result)
- full_addrs.insert(addr_string + ":18080");
+ full_addrs.insert(addr_string + ":" + std::to_string(m_nettype == cryptonote::TESTNET ? ::config::testnet::P2P_DEFAULT_PORT : m_nettype == cryptonote::STAGENET ? ::config::stagenet::P2P_DEFAULT_PORT : ::config::P2P_DEFAULT_PORT));
}
++i;
}