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

Remove redundant pool connection msg code #1488

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 3 additions & 10 deletions xmrstak/misc/executor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -193,10 +193,7 @@ void executor::eval_pool_choice()
{
if(!goal->is_running() && goal->can_connect())
{
if(dev_time)
printer::inst()->print_msg(L1, "Connecting to dev pool ...");
else
printer::inst()->print_msg(L1, "Connecting to %s pool ...", goal->get_pool_addr());
printer::inst()->print_msg(L1, "Connecting to %s pool...", dev_time ? "dev" : goal->get_pool_addr());

std::string error;
if(!goal->connect(error))
Expand Down Expand Up @@ -321,11 +318,7 @@ jpsock* executor::pick_pool_by_id(size_t pool_id)
void executor::on_sock_ready(size_t pool_id)
{
jpsock* pool = pick_pool_by_id(pool_id);

if(pool->is_dev_pool())
printer::inst()->print_msg(L1, "Dev pool connected. Logging in...");
else
printer::inst()->print_msg(L1, "Pool %s connected. Logging in...", pool->get_pool_addr());
printer::inst()->print_msg(L1, "%s connected. Logging in...", pool->is_dev_pool() ? "Dev pool" : pool->get_pool_addr());
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would prefer to have "Pool pool.example.com:3333 connected." rather than just "pool.example.com:3333"


if(!pool->cmd_login())
{
Expand All @@ -334,7 +327,7 @@ void executor::on_sock_ready(size_t pool_id)
std::string str = "Login error: " + pool->get_call_error();
log_socket_error(pool, std::move(str));
}

if(!pool->have_sock_error())
pool->disconnect();
}
Expand Down