mirror of
https://github.com/jwinterm/xmr-stak.git
synced 2026-10-19 05:58:41 +02:00
Merge pull request #210 from fireice-uk/topic-aes-override
AES override feature
This commit is contained in:
+10
@@ -76,6 +76,16 @@ null,
|
||||
*/
|
||||
"nicehash_nonce" : false,
|
||||
|
||||
/*
|
||||
* Manual hardware AES override
|
||||
*
|
||||
* Some VMs don't report AES capability correctly. You can set this value to true to enforce hardware AES or
|
||||
* to false to force disable AES or null to let the miner decide if AES is used.
|
||||
*
|
||||
* WARNING: setting this to true on a CPU that doesn't support hardware AES will crash the miner.
|
||||
*/
|
||||
"aes_override" : null,
|
||||
|
||||
/*
|
||||
* TLS Settings
|
||||
* If you need real security, make sure tls_secure_algo is enabled (otherwise MITM attack can downgrade encryption
|
||||
|
||||
@@ -45,7 +45,7 @@ using namespace rapidjson;
|
||||
/*
|
||||
* This enum needs to match index in oConfigValues, otherwise we will get a runtime error
|
||||
*/
|
||||
enum configEnum { aCpuThreadsConf, sUseSlowMem, bNiceHashMode,
|
||||
enum configEnum { aCpuThreadsConf, sUseSlowMem, bNiceHashMode, bAesOverride,
|
||||
bTlsMode, bTlsSecureAlgo, sTlsFingerprint, sPoolAddr, sWalletAddr, sPoolPwd,
|
||||
iCallTimeout, iNetRetry, iGiveUpLimit, iVerboseLevel, iAutohashTime,
|
||||
bDaemonMode, sOutputFile, iHttpdPort, bPreferIpv4 };
|
||||
@@ -62,6 +62,7 @@ configVal oConfigValues[] = {
|
||||
{ aCpuThreadsConf, "cpu_threads_conf", kNullType },
|
||||
{ sUseSlowMem, "use_slow_memory", kStringType },
|
||||
{ bNiceHashMode, "nicehash_nonce", kTrueType },
|
||||
{ bAesOverride, "aes_override", kNullType },
|
||||
{ bTlsMode, "use_tls", kTrueType },
|
||||
{ bTlsSecureAlgo, "tls_secure_algo", kTrueType },
|
||||
{ sTlsFingerprint, "tls_fingerprint", kStringType },
|
||||
@@ -453,11 +454,14 @@ bool jconf::parse_config(const char* sFilename)
|
||||
|
||||
printer::inst()->set_verbose_level(prv->configValues[iVerboseLevel]->GetUint64());
|
||||
|
||||
if(!NeedsAutoconf())
|
||||
{
|
||||
if(!bHaveAes)
|
||||
printer::inst()->print_msg(L0, "Your CPU doesn't support hardware AES. Don't expect high hashrates.");
|
||||
}
|
||||
if(NeedsAutoconf())
|
||||
return true;
|
||||
|
||||
if(prv->configValues[bAesOverride]->IsBool())
|
||||
bHaveAes = prv->configValues[bAesOverride]->GetBool();
|
||||
|
||||
if(!bHaveAes)
|
||||
printer::inst()->print_msg(L0, "Your CPU doesn't support hardware AES. Don't expect high hashrates.");
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user