Log when voting and warn if voting with more than one account (#2489)
* Log about voting and the number of representatives configured * Fix stream * Clarify stdout message
This commit is contained in:
parent
baafd5ffc2
commit
71b0f6ef35
2 changed files with 21 additions and 1 deletions
|
@ -62,7 +62,11 @@ void nano_daemon::daemon::run (boost::filesystem::path const & data_path, nano::
|
|||
<< "Path: " << node->application_path.string () << "\n"
|
||||
<< "Build Info: " << BUILD_INFO << "\n"
|
||||
<< "Database backend: " << node->store.vendor_get () << std::endl;
|
||||
|
||||
auto voting (node->wallets.rep_counts ().voting);
|
||||
if (voting > 1)
|
||||
{
|
||||
std::cout << "Voting with more than one representative can limit performance: " << voting << " representatives are configured" << std::endl;
|
||||
}
|
||||
node->start ();
|
||||
nano::ipc::ipc_server ipc_server (*node, config.rpc);
|
||||
#if BOOST_PROCESS_SUPPORTED
|
||||
|
|
|
@ -382,6 +382,22 @@ startup_time (std::chrono::steady_clock::now ())
|
|||
std::exit (1);
|
||||
}
|
||||
|
||||
if (config.enable_voting)
|
||||
{
|
||||
std::ostringstream stream;
|
||||
stream << "Voting is enabled, more system resources will be used";
|
||||
auto voting (wallets.rep_counts ().voting);
|
||||
if (voting > 0)
|
||||
{
|
||||
stream << ". " << voting << " representative(s) are configured";
|
||||
if (voting > 1)
|
||||
{
|
||||
stream << ". Voting with more than one representative can limit performance";
|
||||
}
|
||||
}
|
||||
logger.always_log (stream.str ());
|
||||
}
|
||||
|
||||
node_id = nano::keypair ();
|
||||
logger.always_log ("Node ID: ", node_id.pub.to_node_id ());
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue