NiceHash fixing at 90k diff.

This commit is contained in:
Alexander Blair
2017-02-17 16:13:58 -08:00
parent ea8226ccac
commit 33e2f08eeb
2 changed files with 7 additions and 1 deletions
+2
View File
@@ -33,6 +33,8 @@ function Coin(data){
this.intPrefix = 54; this.intPrefix = 54;
} }
this.niceHashDiff = 90000;
this.getBlockHeaderByID = function(blockId, callback){ this.getBlockHeaderByID = function(blockId, callback){
global.support.rpcDaemon('getblockheaderbyheight', {"height": blockId}, function (body) { global.support.rpcDaemon('getblockheaderbyheight', {"height": blockId}, function (body) {
if (body.hasOwnProperty('result')){ if (body.hasOwnProperty('result')){
+5 -1
View File
@@ -195,7 +195,7 @@ function Miner(id, login, pass, ipAddress, startingDiff, messageSender, protoVer
let pass_split = pass.split(":"); let pass_split = pass.split(":");
this.error = ""; this.error = "";
this.identifier = pass_split[0]; this.identifier = pass_split[0];
if (agent.contains('MinerGate')){ if (agent.includes('MinerGate')){
this.identifier = "MinerGate"; this.identifier = "MinerGate";
} }
this.paymentID = null; this.paymentID = null;
@@ -223,6 +223,10 @@ function Miner(id, login, pass, ipAddress, startingDiff, messageSender, protoVer
this.fixed_diff = false; this.fixed_diff = false;
this.difficulty = startingDiff; this.difficulty = startingDiff;
this.connectTime = Date.now(); this.connectTime = Date.now();
if (agent.includes('NiceHash')){
this.fixed_diff = true;
this.difficulty = global.coinFuncs.niceHashDiff;
}
if (diffSplit.length === 2) { if (diffSplit.length === 2) {
this.fixed_diff = true; this.fixed_diff = true;
this.difficulty = Number(diffSplit[1]); this.difficulty = Number(diffSplit[1]);