Fix for broken block polling
This commit is contained in:
parent
54ef804c05
commit
5b0c39e840
@ -21,7 +21,7 @@ which are written in python. Compared to the spaghetti state of the latest
|
|||||||
lower barrier to entry for other developers to fork and add features or fix bugs.
|
lower barrier to entry for other developers to fork and add features or fix bugs.
|
||||||
|
|
||||||
|
|
||||||
Features (need additional testing)
|
Features
|
||||||
----------------------------------
|
----------------------------------
|
||||||
* Daemon RPC interface
|
* Daemon RPC interface
|
||||||
* Stratum TCP socket server
|
* Stratum TCP socket server
|
||||||
@ -42,7 +42,6 @@ Features (need additional testing)
|
|||||||
|
|
||||||
#### Under development
|
#### Under development
|
||||||
* P2P functionality for highly efficient block updates from daemon as a peer node
|
* P2P functionality for highly efficient block updates from daemon as a peer node
|
||||||
* Ability to use multiple daemons for block updates and submitting blocks
|
|
||||||
* Clustering to take advantage of multiple CPU cores
|
* Clustering to take advantage of multiple CPU cores
|
||||||
|
|
||||||
#### To do
|
#### To do
|
||||||
|
|||||||
@ -336,7 +336,7 @@ var pool = module.exports = function pool(options, authorizeFn){
|
|||||||
|
|
||||||
function SetupBlockPolling(){
|
function SetupBlockPolling(){
|
||||||
|
|
||||||
if (typeof options.blockRefreshInterval === "number" && options.blockRefreshInterval > 0){
|
if (typeof options.blockRefreshInterval !== "number" || options.blockRefreshInterval <= 0){
|
||||||
emitLog('system', 'Block template polling has been disabled');
|
emitLog('system', 'Block template polling has been disabled');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -348,7 +348,6 @@ var pool = module.exports = function pool(options, authorizeFn){
|
|||||||
if (error) {
|
if (error) {
|
||||||
emitErrorLog('system', "Block polling error getting block template for " + options.name)
|
emitErrorLog('system', "Block polling error getting block template for " + options.name)
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
}, pollingInterval);
|
}, pollingInterval);
|
||||||
@ -362,7 +361,6 @@ var pool = module.exports = function pool(options, authorizeFn){
|
|||||||
if (error) {
|
if (error) {
|
||||||
callback(error);
|
callback(error);
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
var processedNewBlock = _this.jobManager.processTemplate(result, publicKeyBuffer);
|
var processedNewBlock = _this.jobManager.processTemplate(result, publicKeyBuffer);
|
||||||
|
|
||||||
if (processedNewBlock && options.varDiff.enabled)
|
if (processedNewBlock && options.varDiff.enabled)
|
||||||
|
|||||||
@ -228,7 +228,6 @@ var StratumClient = function(options){
|
|||||||
method: "mining.set_difficulty",
|
method: "mining.set_difficulty",
|
||||||
params: [difficulty]//[512],
|
params: [difficulty]//[512],
|
||||||
});
|
});
|
||||||
console.log('new diff sent ' + difficulty);
|
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user