Skip to content

Commit

Permalink
fix tsl not used on first start
Browse files Browse the repository at this point in the history
- during the start of the miner and the guided setup the tls settings
was ignored.
- fix that parameters from the guided start is passed to the parameter singelton
  • Loading branch information
psychocrypt committed Nov 25, 2019
1 parent bcbd88b commit bc08d60
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
12 changes: 6 additions & 6 deletions xmrstak/cli/cli-miner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ void do_guided_pool_config()
configTpl.set(std::string(tpl));
bool prompted = false;

auto& currency = params::inst().currency;
auto currency = params::inst().currency;
if(currency.empty() || !jconf::IsOnAlgoList(currency))
{
prompt_once(prompted);
Expand All @@ -236,7 +236,7 @@ void do_guided_pool_config()
currency = tmp;
}

auto& pool = params::inst().poolURL;
auto pool = params::inst().poolURL;
bool userSetPool = true;
if(pool.empty())
{
Expand All @@ -247,7 +247,7 @@ void do_guided_pool_config()
std::cin >> pool;
}

auto& userName = params::inst().poolUsername;
auto userName = params::inst().poolUsername;
if(userName.empty())
{
prompt_once(prompted);
Expand All @@ -257,7 +257,7 @@ void do_guided_pool_config()
}

bool stdin_flushed = false;
auto& passwd = params::inst().poolPasswd;
auto passwd = params::inst().poolPasswd;
if(passwd.empty() && !params::inst().userSetPwd)
{
prompt_once(prompted);
Expand All @@ -271,7 +271,7 @@ void do_guided_pool_config()
getline(std::cin, passwd);
}

auto& rigid = params::inst().poolRigid;
auto rigid = params::inst().poolRigid;
if(rigid.empty() && !params::inst().userSetRigid)
{
if(!use_simple_start())
Expand Down Expand Up @@ -366,7 +366,7 @@ void do_guided_config()
configTpl.set(std::string(tpl));
bool prompted = false;

auto& http_port = params::inst().httpd_port;
auto http_port = params::inst().httpd_port;
if(http_port == params::httpd_port_unset)
{
http_port = params::httpd_port_disabled;
Expand Down
3 changes: 2 additions & 1 deletion xmrstak/misc/executor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -525,8 +525,9 @@ void executor::ex_main()
const char* rigid = params.userSetRigid ? params.poolRigid.c_str() : cfg.sRigId;
const char* pwd = params.userSetPwd ? params.poolPasswd.c_str() : cfg.sPasswd;
bool nicehash = cfg.nicehash || params.nicehashMode;
bool tls = cfg.tls || params.poolUseTls;

pools.emplace_back(i, cfg.sPoolAddr, wallet, rigid, pwd, 9.9, params.poolUseTls, cfg.tls_fingerprint, nicehash);
pools.emplace_back(i, cfg.sPoolAddr, wallet, rigid, pwd, 9.9, tls, cfg.tls_fingerprint, nicehash);
}
else
pools.emplace_back(i, cfg.sPoolAddr, cfg.sWalletAddr, cfg.sRigId, cfg.sPasswd, cfg.weight, cfg.tls, cfg.tls_fingerprint, cfg.nicehash);
Expand Down

0 comments on commit bc08d60

Please sign in to comment.