Skip to content

Commit

Permalink
catch hotplug early start bug, increase work cache timings
Browse files Browse the repository at this point in the history
  • Loading branch information
alexsmith540 committed Sep 24, 2020
1 parent 67e9cb4 commit 0f6861c
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions miner/HandyMiner_GoldShell.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ class HandyMiner {
}
this.config = config;
this.solutionIDs = 0;
this.minerIsConnected = false;
if(this.config.muteWinningFanfare){
//I'd like not to revel in the glory of getting a block...
PlayWinningSound = false;
Expand Down Expand Up @@ -617,7 +618,7 @@ class HandyMiner {
break;
case 'mining.set_difficulty':
case 'set_difficulty':

this.minerIsConnected = true;
if(!this.useStaticPoolDifficulty && this.config.mode == 'pool'){
let lastDiff = this.poolDifficulty;
//do adaptive diff here
Expand Down Expand Up @@ -1173,9 +1174,9 @@ class HandyMiner {
console.error('error setting device params',err.toString('utf8'));
}
else{
this.generateWork(asicID);


if(this.minerIsConnected){
this.generateWork(asicID);
}
}
})
let timeInterval = 20000;
Expand Down Expand Up @@ -1555,7 +1556,7 @@ class HandyMiner {
data += '69C35A';

serialConn.write(new Buffer.from(data,'hex'),err=>{
//this.gpuDeviceBlocks[workerID+'_'+asicID] = this.nextDeviceBlocks[workerID+'_'+asicID];
this.gpuDeviceBlocks[workerID+'_'+asicID] = this.nextDeviceBlocks[workerID+'_'+asicID];
})
}
spawnASICWorker(asicID,asicArrayI){
Expand Down

0 comments on commit 0f6861c

Please sign in to comment.