Skip to content

Commit

Permalink
Added cn/half and cn-pico algo support
Browse files Browse the repository at this point in the history
  • Loading branch information
MoneroOcean committed Jan 31, 2019
1 parent 638fd86 commit cb13f26
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions mm.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ const child_process = require('child_process');
// *** CONSTS ***
// *****************************************************************************

const VERSION = "v1.4";
const VERSION = "v1.5";
const DEFAULT_ALGO = "cn/2"; // this is algo that is assumed to be sent by pool if its job does not contain algo stratum extension
const AGENT = "Meta Miner " + VERSION;

Expand All @@ -50,15 +50,17 @@ const hashrate_regexes = [
const algo_perf_algo = {
"cn/2": "cn/2",
"cn": "cn/1",
"cn/msr": "cn/msr",
"cn/half": "cn/half",
"cn-pico": "cn-pico/trtl",
"cn-lite": "cn-lite/1",
"cn-heavy": "cn-heavy/0",
};

function algo_perf_class(algo) { // converts algo to algo class
if (algo.indexOf("heavy") > -1) return "cn-heavy";
if (algo.indexOf("lite") > -1) return "cn-lite";
if (algo.indexOf("msr") > -1) return "cn/msr";
if (algo.indexOf("half") > -1) return "cn/half";
if (algo.indexOf("pico") > -1) return "cn-pico";
if (algo.indexOf("cn/2") > -1) return "cn/2";
return "cn";
}
Expand All @@ -77,7 +79,8 @@ let c = {
algo_perf: {
"cn/2": 0,
"cn": 0,
"cn/msr": 0,
"cn/half": 0,
"cn-pico": 0,
"cn-lite": 0,
"cn-heavy": 0,
},
Expand Down

0 comments on commit cb13f26

Please sign in to comment.