mirror of
https://github.com/jwinterm/xmr-stak.git
synced 2026-10-17 05:41:41 +02:00
Add --use-nicehash option
This commit is contained in:
@@ -91,6 +91,7 @@ void help()
|
||||
cout<<" -O, --tls-url URL TLS pool url and port, e.g. pool.usxmrpool.com:10443"<<endl;
|
||||
cout<<" -u, --user USERNAME pool user name or wallet address"<<endl;
|
||||
cout<<" -p, --pass PASSWD pool password, in the most cases x or empty \"\""<<endl;
|
||||
cout<<" --use-nicehash the pool should run in nicehash mode"<<endl;
|
||||
cout<<" \n"<<endl;
|
||||
#ifdef _WIN32
|
||||
cout<<"Environment variables:\n"<<endl;
|
||||
@@ -260,7 +261,7 @@ void do_guided_config()
|
||||
nicehash = read_yes_no("- Do you want to use nicehash on this pool? (y/n)");
|
||||
}
|
||||
else
|
||||
nicehash = false;
|
||||
nicehash = params::inst().nicehashMode;
|
||||
|
||||
bool multipool;
|
||||
if(!userSetPool)
|
||||
@@ -499,6 +500,10 @@ int main(int argc, char *argv[])
|
||||
params::inst().userSetPwd = true;
|
||||
params::inst().poolPasswd = argv[i];
|
||||
}
|
||||
else if(opName.compare("--use-nicehash") == 0)
|
||||
{
|
||||
params::inst().nicehashMode = true;
|
||||
}
|
||||
else if(opName.compare("-c") == 0 || opName.compare("--config") == 0)
|
||||
{
|
||||
++i;
|
||||
|
||||
@@ -520,8 +520,9 @@ void executor::ex_main()
|
||||
|
||||
const char* wallet = params.poolUsername.empty() ? cfg.sWalletAddr : params.poolUsername.c_str();
|
||||
const char* pwd = params.userSetPwd ? params.poolPasswd.c_str() : cfg.sPasswd;
|
||||
bool nicehash = cfg.nicehash || params.nicehashMode;
|
||||
|
||||
pools.emplace_back(i+1, cfg.sPoolAddr, wallet, pwd, 9.9, false, params.poolUseTls, cfg.tls_fingerprint, cfg.nicehash);
|
||||
pools.emplace_back(i+1, cfg.sPoolAddr, wallet, pwd, 9.9, false, params.poolUseTls, cfg.tls_fingerprint, nicehash);
|
||||
}
|
||||
else
|
||||
pools.emplace_back(i+1, cfg.sPoolAddr, cfg.sWalletAddr, cfg.sPasswd, cfg.weight, false, cfg.tls, cfg.tls_fingerprint, cfg.nicehash);
|
||||
@@ -530,7 +531,7 @@ void executor::ex_main()
|
||||
if(!xmrstak::params::inst().poolURL.empty() && !already_have_cli_pool)
|
||||
{
|
||||
auto& params = xmrstak::params::inst();
|
||||
pools.emplace_front(i+1, params.poolURL.c_str(), params.poolUsername.c_str(), params.poolPasswd.c_str(), 9.9, false, params.poolUseTls, "", false);
|
||||
pools.emplace_front(i+1, params.poolURL.c_str(), params.poolUsername.c_str(), params.poolPasswd.c_str(), 9.9, false, params.poolUseTls, "", params.nicehashMode);
|
||||
}
|
||||
|
||||
if(jconf::inst()->IsCurrencyMonero())
|
||||
|
||||
@@ -29,6 +29,7 @@ struct params
|
||||
bool userSetPwd = false;
|
||||
std::string poolPasswd;
|
||||
std::string poolUsername;
|
||||
bool nicehashMode = false;
|
||||
|
||||
std::string currency;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user