summaryrefslogtreecommitdiffstats
path: root/xmrstak/jconf.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'xmrstak/jconf.cpp')
-rw-r--r--xmrstak/jconf.cpp60
1 files changed, 28 insertions, 32 deletions
diff --git a/xmrstak/jconf.cpp b/xmrstak/jconf.cpp
index f99698a..3af4028 100644
--- a/xmrstak/jconf.cpp
+++ b/xmrstak/jconf.cpp
@@ -86,30 +86,28 @@ configVal oConfigValues[] = {
constexpr size_t iConfigCnt = (sizeof(oConfigValues)/sizeof(oConfigValues[0]));
-struct xmrstak_coin_algo
-{
- const char* coin_name;
- xmrstak_algo algo;
- xmrstak_algo algo_root;
- uint8_t fork_version;
- const char* default_pool;
-};
-
-xmrstak_coin_algo coin_algos[] = {
- { "aeon7", cryptonight_aeon, cryptonight_lite, 7u, "mine.aeon-pool.com:5555" },
- { "cryptonight", cryptonight, cryptonight, 0u, nullptr },
- { "cryptonight_lite", cryptonight_lite, cryptonight_lite, 0u, nullptr },
- { "edollar", cryptonight, cryptonight, 0u, nullptr },
- { "electroneum", cryptonight, cryptonight, 0u, nullptr },
- { "graft", cryptonight, cryptonight, 0u, nullptr },
- { "intense", cryptonight, cryptonight, 0u, nullptr },
- { "karbo", cryptonight, cryptonight, 0u, nullptr },
- { "monero7", cryptonight_monero, cryptonight, 7u, "pool.usxmrpool.com:3333" },
- { "stellite", cryptonight_monero, cryptonight, 3u, nullptr },
- { "sumokoin", cryptonight_heavy, cryptonight, 3u, nullptr }
+xmrstak::coin_selection coins[] = {
+ // name, userpool, devpool, default_pool_suggestion
+ { "aeon7", {cryptonight_aeon, cryptonight_lite, 7u}, {cryptonight_aeon, cryptonight_lite, 7u}, "mine.aeon-pool.com:5555" },
+ { "bbscoin", {cryptonight_monero, cryptonight, 3u}, {cryptonight_monero, cryptonight_monero, 0u}, nullptr },
+ { "croat", {cryptonight_monero, cryptonight, 255u}, {cryptonight_monero, cryptonight_monero, 0u}, nullptr },
+ { "cryptonight", {cryptonight_monero, cryptonight, 255u}, {cryptonight_monero, cryptonight_monero, 0u}, nullptr },
+ { "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_v7", {cryptonight_monero, cryptonight_monero, 0u}, {cryptonight_monero, cryptonight_monero, 0u}, 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 },
+ { "karbo", {cryptonight_monero, cryptonight, 255u}, {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 }
};
-constexpr size_t coin_alogo_size = (sizeof(coin_algos)/sizeof(coin_algos[0]));
+constexpr size_t coin_alogo_size = (sizeof(coins)/sizeof(coins[0]));
inline bool checkType(Type have, Type want)
{
@@ -313,7 +311,7 @@ void jconf::GetAlgoList(std::string& list)
for(size_t i=0; i < coin_alogo_size; i++)
{
list += "\t- ";
- list += coin_algos[i].coin_name;
+ list += coins[i].coin_name;
list += "\n";
}
}
@@ -331,7 +329,7 @@ bool jconf::IsOnAlgoList(std::string& needle)
for(size_t i=0; i < coin_alogo_size; i++)
{
- if(needle == coin_algos[i].coin_name)
+ if(needle == coins[i].coin_name)
return true;
}
return false;
@@ -343,10 +341,10 @@ const char* jconf::GetDefaultPool(const char* needle)
for(size_t i=0; i < coin_alogo_size; i++)
{
- if(strcmp(needle, coin_algos[i].coin_name) == 0)
+ if(strcmp(needle, coins[i].coin_name) == 0)
{
- if(coin_algos[i].default_pool != nullptr)
- return coin_algos[i].default_pool;
+ if(coins[i].default_pool != nullptr)
+ return coins[i].default_pool;
else
return default_example;
}
@@ -630,16 +628,14 @@ bool jconf::parse_config(const char* sFilename, const char* sFilenamePools)
return false;
}
- if(ctmp == coin_algos[i].coin_name)
+ if(ctmp == coins[i].coin_name)
{
- mining_algo = coin_algos[i].algo;
- mining_algo_root = coin_algos[i].algo_root;
- mining_fork_version = coin_algos[i].fork_version;
+ currentCoin = coins[i];
break;
}
}
- if(mining_algo == invalid_algo)
+ if(currentCoin.GetDescription(1).GetMiningAlgo() == invalid_algo)
{
std::string cl;
GetAlgoList(cl);
OpenPOWER on IntegriCloud