Skip to content
Snippets Groups Projects
Commit f1e3466a authored by Cédric Moreau's avatar Cédric Moreau
Browse files

Fix #135: explicit call for starting computation of new blocks

parent 92ffeab4
Branches
Tags
No related merge requests found
......@@ -407,6 +407,11 @@ function serverStart(server, conf) {
}
next();
})
.then(function(){
if (conf.participate) {
return server.startBlockComputation();
}
})
.fail(next);
}
], function (err) {
......
......@@ -167,6 +167,18 @@ function Server (dbConf, overrideConf) {
},
function (next){
if (conf.participate) {
}
next();
},
function (next) {
// Launch a block analysis
that.BlockchainService.addStatComputing();
next();
}
], done);
};
this.startBlockComputation = function() {
async.forever(
function tryToGenerateNextBlock(next) {
async.waterfall([
......@@ -190,15 +202,6 @@ function Server (dbConf, overrideConf) {
logger.error('Block generation STOPPED.');
}
);
}
next();
},
function (next) {
// Launch a block analysis
that.BlockchainService.addStatComputing();
next();
}
], done);
};
this.checkConfig = function () {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment