Updated readme setup options

This commit is contained in:
Matt 2014-02-19 23:46:14 -07:00
parent 1b7a0fd7ad
commit 2f4425a087
3 changed files with 12 additions and 7 deletions

View File

@ -82,6 +82,7 @@ var pool = stratum.createPool({
txMessages: false //or true
address: "nhfNedMmQ1Rjb62znwaiJgFhL3f4NQztSp",
stratumPort: 3334,
//instanceId: 37, //I recommend not to use this option as a crypto-random one will be generated
difficulty: 32,
blockRefreshInterval: 2, //seconds
daemon: {
@ -98,6 +99,10 @@ var pool = stratum.createPool({
targetTime: 30, //target time per share (i.e. try to get 1 share per this many seconds)
retargetTime: 120, //check to see if we should retarget every this many seconds
variancePercent: 20 //allow average time to very this % from target without retarget
/* Enabling this option will queue client difficulty updates to be sent when a new job
is available. Otherwise new difficulties will be sent immediately. */
//mode: 'safe'
}
}, function(ip, workerName, password, callback){ //stratum authorization function

View File

@ -53,17 +53,17 @@ var pool = module.exports = function pool(options, authorizeFn){
}).on('newDifficulty', function(client, newDiff) {
if (options.varDiff.mode === 'fast'){
if (options.varDiff.mode === 'safe'){
// We request to set the newDiff @ the next difficulty retarget
// (which should happen when a new job comes in - AKA BLOCK)
client.enqueueNextDifficulty(newDiff);
}
else{
client.sendDifficulty(newDiff);
var job = _this.jobManager.currentJob.getJobParams();
job[8] = false;
client.sendMiningJob(job);
}
else{
// We request to set the newDiff @ the next difficulty retarget
// (which should happen when a new job comes in - AKA BLOCK)
client.enqueueNextDifficulty(newDiff);
}
});
emitLog("system", "VarDiff enabled and setup");
}

View File

@ -1,6 +1,6 @@
{
"name": "stratum-pool",
"version": "0.0.7",
"version": "0.0.8",
"author": "Matthew Little",
"description": "High performance Stratum poolserver in Node.js",
"contributors": [