summaryrefslogtreecommitdiffstats
path: root/xmrstak/jconf.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'xmrstak/jconf.cpp')
-rw-r--r--xmrstak/jconf.cpp29
1 files changed, 17 insertions, 12 deletions
diff --git a/xmrstak/jconf.cpp b/xmrstak/jconf.cpp
index 3af4028..b85ddd3 100644
--- a/xmrstak/jconf.cpp
+++ b/xmrstak/jconf.cpp
@@ -51,8 +51,8 @@ using namespace rapidjson;
* This enum needs to match index in oConfigValues, otherwise we will get a runtime error
*/
enum configEnum {
- aPoolList, sCurrency, bTlsSecureAlgo, iCallTimeout, iNetRetry, iGiveUpLimit, iVerboseLevel, bPrintMotd, iAutohashTime,
- bFlushStdout, bDaemonMode, sOutputFile, iHttpdPort, sHttpLogin, sHttpPass, bPreferIpv4, bAesOverride, sUseSlowMem
+ aPoolList, sCurrency, bTlsSecureAlgo, iCallTimeout, iNetRetry, iGiveUpLimit, iVerboseLevel, bPrintMotd, iAutohashTime,
+ bFlushStdout, bDaemonMode, sOutputFile, iHttpdPort, sHttpLogin, sHttpPass, bPreferIpv4, bAesOverride, sUseSlowMem
};
struct configVal {
@@ -95,19 +95,24 @@ xmrstak::coin_selection coins[] = {
{ "cryptonight_heavy", {cryptonight_heavy, cryptonight_heavy, 0u}, {cryptonight_heavy, cryptonight_heavy, 0u}, nullptr },
{ "cryptonight_lite", {cryptonight_aeon, cryptonight_lite, 255u}, {cryptonight_aeon, cryptonight_lite, 7u}, nullptr },
{ "cryptonight_lite_v7", {cryptonight_lite, cryptonight_aeon, 255u}, {cryptonight_aeon, cryptonight_lite, 7u}, nullptr },
+ { "cryptonight_lite_v7_xor", {cryptonight_aeon, cryptonight_ipbc, 255u}, {cryptonight_aeon, cryptonight_aeon, 255u}, nullptr },
{ "cryptonight_v7", {cryptonight_monero, cryptonight_monero, 0u}, {cryptonight_monero, cryptonight_monero, 0u}, nullptr },
+ { "cryptonight_v7_stellite", {cryptonight_monero, cryptonight_stellite, 255u}, {cryptonight_monero, cryptonight_monero, 255u}, nullptr },
{ "edollar", {cryptonight_monero, cryptonight, 255u}, {cryptonight_monero, cryptonight_monero, 0u}, nullptr },
{ "electroneum", {cryptonight_monero, cryptonight, 255u}, {cryptonight_monero, cryptonight_monero, 0u}, nullptr },
{ "graft", {cryptonight_monero, cryptonight, 8u}, {cryptonight_monero, cryptonight_monero, 0u}, nullptr },
{ "haven", {cryptonight_heavy, cryptonight, 2u}, {cryptonight_heavy, cryptonight_heavy, 0u}, nullptr },
{ "intense", {cryptonight_monero, cryptonight, 4u}, {cryptonight_monero, cryptonight_monero, 0u}, nullptr },
+ { "ipbc", {cryptonight_aeon, cryptonight_ipbc, 255u}, {cryptonight_aeon, cryptonight_aeon, 255u}, nullptr },
{ "karbo", {cryptonight_monero, cryptonight, 255u}, {cryptonight_monero, cryptonight_monero, 0u}, nullptr },
+ { "masari", {cryptonight_monero, cryptonight, 5u}, {cryptonight_monero, cryptonight_monero, 0u}, nullptr },
{ "monero7", {cryptonight_monero, cryptonight_monero, 0u}, {cryptonight_monero, cryptonight_monero, 0u}, "pool.usxmrpool.com:3333" },
- { "stellite", {cryptonight_monero, cryptonight, 3u}, {cryptonight_monero, cryptonight_monero, 0u}, nullptr },
- { "sumokoin", {cryptonight_heavy, cryptonight_heavy, 0u}, {cryptonight_heavy, cryptonight_heavy, 0u}, nullptr }
+ { "stellite", {cryptonight_stellite, cryptonight_monero, 4u}, {cryptonight_monero, cryptonight_monero, 0u}, nullptr },
+ { "sumokoin", {cryptonight_heavy, cryptonight_heavy, 0u}, {cryptonight_heavy, cryptonight_heavy, 0u}, nullptr },
+ { "turtlecoin", {cryptonight_lite, cryptonight_aeon, 255u}, {cryptonight_aeon, cryptonight_lite, 7u}, nullptr }
};
-constexpr size_t coin_alogo_size = (sizeof(coins)/sizeof(coins[0]));
+constexpr size_t coin_algo_size = (sizeof(coins)/sizeof(coins[0]));
inline bool checkType(Type have, Type want)
{
@@ -308,7 +313,7 @@ std::string jconf::GetMiningCoin()
void jconf::GetAlgoList(std::string& list)
{
list.reserve(256);
- for(size_t i=0; i < coin_alogo_size; i++)
+ for(size_t i=0; i < coin_algo_size; i++)
{
list += "\t- ";
list += coins[i].coin_name;
@@ -319,7 +324,7 @@ void jconf::GetAlgoList(std::string& list)
bool jconf::IsOnAlgoList(std::string& needle)
{
std::transform(needle.begin(), needle.end(), needle.begin(), ::tolower);
-
+
if(needle == "monero")
{
printer::inst()->print_msg(L0, "You entered Monero as coin name. Monero will hard-fork the PoW.\nThis means it will stop being compatible with other cryptonight coins.\n"
@@ -327,7 +332,7 @@ bool jconf::IsOnAlgoList(std::string& needle)
return false;
}
- for(size_t i=0; i < coin_alogo_size; i++)
+ for(size_t i=0; i < coin_algo_size; i++)
{
if(needle == coins[i].coin_name)
return true;
@@ -338,8 +343,8 @@ bool jconf::IsOnAlgoList(std::string& needle)
const char* jconf::GetDefaultPool(const char* needle)
{
const char* default_example = "pool.example.com:3333";
-
- for(size_t i=0; i < coin_alogo_size; i++)
+
+ for(size_t i=0; i < coin_algo_size; i++)
{
if(strcmp(needle, coins[i].coin_name) == 0)
{
@@ -510,7 +515,7 @@ bool jconf::parse_config(const char* sFilename, const char* sFilenamePools)
for(uint32_t i=0; i < pool_cnt; i++)
{
const Value& oThdConf = prv->configValues[aPoolList]->GetArray()[i];
-
+
if(!oThdConf.IsObject())
{
printer::inst()->print_msg(L0, "Invalid config file. pool_list must contain objects.");
@@ -619,7 +624,7 @@ bool jconf::parse_config(const char* sFilename, const char* sFilenamePools)
return false;
}
- for(size_t i=0; i < coin_alogo_size; i++)
+ for(size_t i=0; i < coin_algo_size; i++)
{
if(ctmp == "monero")
{
OpenPOWER on IntegriCloud