Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Print info about network and path, when running daemon #1953

Merged
merged 6 commits into from Jun 6, 2019
Merged
Changes from all commits
Commits
File filter...
Filter file types
Jump to…
Jump to file or symbol
Failed to load files and symbols.

Always

Just for now

@@ -47,6 +47,11 @@ void nano_daemon::daemon::run (boost::filesystem::path const & data_path, nano::
auto node (std::make_shared<nano::node> (init, io_ctx, data_path, alarm, config.node, opencl_work, flags));
if (!init.error ())
{
auto network_label = node->network_params.network.get_current_network_as_string ();
auto version = (NANO_VERSION_PATCH == 0) ? NANO_MAJOR_MINOR_VERSION : NANO_MAJOR_MINOR_RC_VERSION;
std::cout << "Network: " << network_label << ", version: " << version << std::endl
<< "Path: " << node->application_path.string () << std::endl;

node->start ();
nano::ipc::ipc_server ipc_server (*node, config.rpc);
#if BOOST_PROCESS_SUPPORTED
@@ -405,6 +405,7 @@ startup_time (std::chrono::steady_clock::now ())
}
});
}

if (NANO_VERSION_PATCH == 0)
{
logger.always_log ("Node starting, version: ", NANO_MAJOR_MINOR_VERSION);
@@ -414,6 +415,9 @@ startup_time (std::chrono::steady_clock::now ())
logger.always_log ("Node starting, version: ", NANO_MAJOR_MINOR_RC_VERSION);
}

auto network_label = network_params.network.get_current_network_as_string ();
logger.always_log ("Active network: ", network_label);

logger.always_log (boost::str (boost::format ("Work pool running %1% threads") % work.threads.size ()));

if (config.logging.node_lifetime_tracing ())
@@ -74,14 +74,10 @@ balance_label (new QLabel),
wallet (wallet_a)
{
your_account_label->setStyleSheet ("font-weight: bold;");
std::string network = "Live";
if (wallet.node.network_params.network.is_beta_network ())
std::string network = wallet.node.network_params.network.get_current_network_as_string ();
if (!network.empty ())

This comment has been minimized.

Copy link
@wezrule

wezrule May 30, 2019

Collaborator

this is probably unnecessary (overly defensive) as network will always be populated, but it's fine as well.

{
network = "Beta";
}
else if (wallet.node.network_params.network.is_test_network ())
{
network = "Test";
network[0] = std::toupper (network[0]);
}
if (NANO_VERSION_PATCH == 0)
{
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.