mirror of
https://codeberg.org/anoncontributorxmr/monero.git
synced 2024-11-30 06:43:28 +01:00
Fix tests building -- function signatures changed
This commit is contained in:
parent
db53e1956a
commit
76289d0e3b
@ -34,6 +34,7 @@
|
|||||||
#include "misc_log_ex.h"
|
#include "misc_log_ex.h"
|
||||||
#include <stdexcept>
|
#include <stdexcept>
|
||||||
#include <boost/program_options.hpp>
|
#include <boost/program_options.hpp>
|
||||||
|
#include "daemon/command_line_args.h"
|
||||||
|
|
||||||
namespace daemonize
|
namespace daemonize
|
||||||
{
|
{
|
||||||
|
@ -60,6 +60,7 @@ int main(int argc, char const * argv[])
|
|||||||
po::positional_options_description positional_options;
|
po::positional_options_description positional_options;
|
||||||
{
|
{
|
||||||
bf::path default_data_dir = daemonizer::get_default_data_dir();
|
bf::path default_data_dir = daemonizer::get_default_data_dir();
|
||||||
|
bf::path default_testnet_data_dir = {default_data_dir / "testnet"};
|
||||||
|
|
||||||
// Misc Options
|
// 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, command_line::arg_version);
|
||||||
command_line::add_arg(visible_options, daemon_args::arg_os_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_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");
|
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());
|
command_line::add_arg(visible_options, daemon_args::arg_config_file, default_conf.string());
|
||||||
|
|
||||||
|
@ -106,7 +106,6 @@ int main(int argc, char* argv[])
|
|||||||
cryptonote::t_cryptonote_protocol_handler<tests::proxy_core> cprotocol(pr_core, NULL);
|
cryptonote::t_cryptonote_protocol_handler<tests::proxy_core> cprotocol(pr_core, NULL);
|
||||||
nodetool::node_server<cryptonote::t_cryptonote_protocol_handler<tests::proxy_core> > p2psrv {
|
nodetool::node_server<cryptonote::t_cryptonote_protocol_handler<tests::proxy_core> > p2psrv {
|
||||||
cprotocol
|
cprotocol
|
||||||
, std::move(config::NETWORK_ID)
|
|
||||||
};
|
};
|
||||||
cprotocol.set_p2p_endpoint(&p2psrv);
|
cprotocol.set_p2p_endpoint(&p2psrv);
|
||||||
//pr_core.set_cryptonote_protocol(&cprotocol);
|
//pr_core.set_cryptonote_protocol(&cprotocol);
|
||||||
@ -115,7 +114,7 @@ int main(int argc, char* argv[])
|
|||||||
//initialize objects
|
//initialize objects
|
||||||
|
|
||||||
LOG_PRINT_L0("Initializing p2p server...");
|
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.");
|
CHECK_AND_ASSERT_MES(res, 1, "Failed to initialize p2p server.");
|
||||||
LOG_PRINT_L0("P2p server initialized OK");
|
LOG_PRINT_L0("P2p server initialized OK");
|
||||||
|
|
||||||
|
@ -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::cryptonote_protocol_stub pr; //TODO: stub only for this kind of test, make real validation of relayed objects
|
||||||
cryptonote::core c(&pr);
|
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;
|
std::cout << concolor::magenta << "Failed to init core" << concolor::normal << std::endl;
|
||||||
return false;
|
return false;
|
||||||
|
Loading…
Reference in New Issue
Block a user