mirror of
https://github.com/monero-project/monero.git
synced 2025-01-28 18:56:31 +02:00
should fix testnet for daemonize
This commit is contained in:
parent
6bd17745b4
commit
aefe02f790
@ -34,6 +34,7 @@
|
||||
#include "misc_log_ex.h"
|
||||
#include <stdexcept>
|
||||
#include <boost/program_options.hpp>
|
||||
#include "daemon/command_line_args.h"
|
||||
|
||||
namespace daemonize
|
||||
{
|
||||
@ -59,10 +60,15 @@ public:
|
||||
: m_core{nullptr}
|
||||
, m_vm_HACK{vm}
|
||||
{
|
||||
bool testnet = command_line::get_arg(vm, daemon_args::arg_testnet_on);
|
||||
|
||||
cryptonote::checkpoints checkpoints;
|
||||
if (!cryptonote::create_checkpoints(checkpoints))
|
||||
if (!testnet)
|
||||
{
|
||||
throw std::runtime_error("Failed to initialize checkpoints");
|
||||
if (!cryptonote::create_checkpoints(checkpoints))
|
||||
{
|
||||
throw std::runtime_error("Failed to initialize checkpoints");
|
||||
}
|
||||
}
|
||||
m_core.set_checkpoints(std::move(checkpoints));
|
||||
}
|
||||
|
@ -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());
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user