aboutsummaryrefslogtreecommitdiff
path: root/src/p2p/net_node.inl
diff options
context:
space:
mode:
authorrfree2monero <rfreemonero@op.pl>2015-04-01 18:24:45 +0200
committerrfree2monero <rfreemonero@op.pl>2015-04-01 18:24:45 +0200
commit3cbdf198f168e113f12fa49d016133c434964ed7 (patch)
tree050c74077de8e1b6e431f7d0671b57b5afcb01ab /src/p2p/net_node.inl
parentfix locking in count-peers thread (2) (diff)
parentMerge pull request #248 (diff)
downloadmonero-3cbdf198f168e113f12fa49d016133c434964ed7.tar.xz
Merge remote-tracking branch 'monero-official/master' into network-1.6-work1
Diffstat (limited to 'src/p2p/net_node.inl')
-rw-r--r--src/p2p/net_node.inl8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/p2p/net_node.inl b/src/p2p/net_node.inl
index afc6436f3..ef158d9a1 100644
--- a/src/p2p/net_node.inl
+++ b/src/p2p/net_node.inl
@@ -46,7 +46,7 @@
#include "net/local_ip.h"
#include "crypto/crypto.h"
#include "storages/levin_abstract_invoke2.h"
-#include "data_logger.hpp"
+#include "daemon/command_line_args.h"
// We have to look for miniupnpc headers in different places, dependent on if its compiled or external
#ifdef UPNP_STATIC
@@ -273,16 +273,20 @@ namespace nodetool
//-----------------------------------------------------------------------------------
template<class t_payload_net_handler>
- bool node_server<t_payload_net_handler>::init(const boost::program_options::variables_map& vm, bool testnet)
+ bool node_server<t_payload_net_handler>::init(const boost::program_options::variables_map& vm)
{
+ bool testnet = command_line::get_arg(vm, daemon_args::arg_testnet_on);
+
if (testnet)
{
+ memcpy(&m_network_id, &::config::testnet::NETWORK_ID, 16);
append_net_address(m_seed_nodes, "107.152.187.202:28080");
append_net_address(m_seed_nodes, "197.242.158.240:28080");
append_net_address(m_seed_nodes, "107.152.130.98:28080");
}
else
{
+ memcpy(&m_network_id, &::config::NETWORK_ID, 16);
// for each hostname in the seed nodes list, attempt to DNS resolve and
// add the result addresses as seed nodes
// TODO: at some point add IPv6 support, but that won't be relevant