diff options
author | Thomas Winget <tewinget@gmail.com> | 2015-02-05 07:21:14 -0500 |
---|---|---|
committer | Thomas Winget <tewinget@gmail.com> | 2015-03-01 02:21:19 -0500 |
commit | 76289d0e3bf514db589169a464c0f6d45dae7043 (patch) | |
tree | d59813521e71fa41a124cfa7d6d30ace54773615 | |
parent | revert stop_daemon method to use correct exit (diff) | |
download | monero-76289d0e3bf514db589169a464c0f6d45dae7043.tar.xz |
Fix tests building -- function signatures changed
-rw-r--r-- | src/daemon/core.h | 1 | ||||
-rw-r--r-- | src/daemon/main.cpp | 2 | ||||
-rw-r--r-- | tests/core_proxy/core_proxy.cpp | 3 | ||||
-rw-r--r-- | tests/core_tests/chaingen.h | 4 |
4 files changed, 7 insertions, 3 deletions
diff --git a/src/daemon/core.h b/src/daemon/core.h index 3cea70601..6564e5314 100644 --- a/src/daemon/core.h +++ b/src/daemon/core.h @@ -34,6 +34,7 @@ #include "misc_log_ex.h" #include <stdexcept> #include <boost/program_options.hpp> +#include "daemon/command_line_args.h" namespace daemonize { diff --git a/src/daemon/main.cpp b/src/daemon/main.cpp index 2f95370c0..dd576a680 100644 --- a/src/daemon/main.cpp +++ b/src/daemon/main.cpp @@ -60,6 +60,7 @@ int main(int argc, char const * argv[]) po::positional_options_description positional_options; { bf::path default_data_dir = daemonizer::get_default_data_dir(); + bf::path default_testnet_data_dir = {default_data_dir / "testnet"}; // Misc Options @@ -67,6 +68,7 @@ int main(int argc, char const * argv[]) command_line::add_arg(visible_options, command_line::arg_version); command_line::add_arg(visible_options, daemon_args::arg_os_version); command_line::add_arg(visible_options, command_line::arg_data_dir, default_data_dir.string()); + command_line::add_arg(visible_options, command_line::arg_testnet_data_dir, default_testnet_data_dir.string()); bf::path default_conf = default_data_dir / std::string(CRYPTONOTE_NAME ".conf"); command_line::add_arg(visible_options, daemon_args::arg_config_file, default_conf.string()); diff --git a/tests/core_proxy/core_proxy.cpp b/tests/core_proxy/core_proxy.cpp index de8f45fc6..da77391c3 100644 --- a/tests/core_proxy/core_proxy.cpp +++ b/tests/core_proxy/core_proxy.cpp @@ -106,7 +106,6 @@ int main(int argc, char* argv[]) cryptonote::t_cryptonote_protocol_handler<tests::proxy_core> cprotocol(pr_core, NULL); nodetool::node_server<cryptonote::t_cryptonote_protocol_handler<tests::proxy_core> > p2psrv { cprotocol - , std::move(config::NETWORK_ID) }; cprotocol.set_p2p_endpoint(&p2psrv); //pr_core.set_cryptonote_protocol(&cprotocol); @@ -115,7 +114,7 @@ int main(int argc, char* argv[]) //initialize objects LOG_PRINT_L0("Initializing p2p server..."); - bool res = p2psrv.init(vm, false); + bool res = p2psrv.init(vm); CHECK_AND_ASSERT_MES(res, 1, "Failed to initialize p2p server."); LOG_PRINT_L0("P2p server initialized OK"); diff --git a/tests/core_tests/chaingen.h b/tests/core_tests/chaingen.h index d25a4f614..d187f36ca 100644 --- a/tests/core_tests/chaingen.h +++ b/tests/core_tests/chaingen.h @@ -487,7 +487,9 @@ inline bool do_replay_events(std::vector<test_event_entry>& events) cryptonote::cryptonote_protocol_stub pr; //TODO: stub only for this kind of test, make real validation of relayed objects cryptonote::core c(&pr); - if (!c.init(vm, false)) + // FIXME: make sure that vm has arg_testnet_on set to true or false if + // this test needs for it to be so. + if (!c.init(vm)) { std::cout << concolor::magenta << "Failed to init core" << concolor::normal << std::endl; return false; |