aboutsummaryrefslogtreecommitdiff
path: root/src/daemon/daemon.cpp
diff options
context:
space:
mode:
authorZachary Michaels <mikezackles@gmail.com>2014-09-08 13:40:28 -0400
committerRiccardo Spagni <ric@spagni.net>2014-09-15 15:53:50 +0200
commit257077a96bf44dcc2b70f1c4aedf312ae6c826d5 (patch)
tree300622576e32331ae8bc9065b97f67f86725a507 /src/daemon/daemon.cpp
parentSeparate rpc port for testnet (diff)
downloadmonero-257077a96bf44dcc2b70f1c4aedf312ae6c826d5.tar.xz
Separate network id for testnet
Diffstat (limited to 'src/daemon/daemon.cpp')
-rw-r--r--src/daemon/daemon.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/daemon/daemon.cpp b/src/daemon/daemon.cpp
index 04f6db4fa..113b2c5dc 100644
--- a/src/daemon/daemon.cpp
+++ b/src/daemon/daemon.cpp
@@ -42,6 +42,7 @@ using namespace epee;
#include "crypto/hash.h"
#include "console_handler.h"
#include "p2p/net_node.h"
+#include "cryptonote_config.h"
#include "cryptonote_core/checkpoints_create.h"
#include "cryptonote_core/cryptonote_core.h"
#include "rpc/core_rpc_server.h"
@@ -202,7 +203,10 @@ int main(int argc, char* argv[])
}
cryptonote::t_cryptonote_protocol_handler<cryptonote::core> cprotocol(ccore, NULL);
- nodetool::node_server<cryptonote::t_cryptonote_protocol_handler<cryptonote::core> > p2psrv(cprotocol);
+ nodetool::node_server<cryptonote::t_cryptonote_protocol_handler<cryptonote::core> > p2psrv {
+ cprotocol
+ , testnet_mode ? std::move(config::testnet::NETWORK_ID) : std::move(config::NETWORK_ID)
+ };
cryptonote::core_rpc_server rpc_server(ccore, p2psrv);
cprotocol.set_p2p_endpoint(&p2psrv);
ccore.set_cryptonote_protocol(&cprotocol);