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

Fix: node should try to compute next block only if local pubkey is a member

parent 573d3c74
No related branches found
No related tags found
No related merge requests found
......@@ -1337,6 +1337,14 @@ function BlockchainService (conn, conf, IdentityService, PeeringService) {
}
var sigFunc, block, difficulty, current;
async.waterfall([
function (next) {
Identity.isMember(PeeringService.pubkey, function (err, isMember) {
if (err || !isMember)
next('Skipping', null, 'Local node is not a member. Waiting to be a member before computing a block.');
else
next();
});
},
function (next) {
Block.current(function (err, current) {
if (err)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment