Commit c31a52ac authored by Cédric Moreau's avatar Cédric Moreau

Added summary log when generating a new keyblock

parent 4ba69926
......@@ -216,6 +216,16 @@ KeyBlockSchema.methods = {
});
});
done();
},
quickDescription: function () {
var desc = '#' + this.number + ' (';
var counts = { 'N': 0, 'U': 0, 'L': 0, 'B': 0 };
this.keysChanges.forEach(function(kc){
counts[kc.type]++;
});
desc += counts.N + ' newcomers, ' + counts.U + ' updates)';
return desc;
}
};
......
......@@ -324,8 +324,7 @@ function proveAndSend (server, block, sigFunc, difficulty, host, port, done) {
var peer = new Peer({
endpoints: [['BASIC_MERKLED_API', host, port].join(' ')]
});
console.log(block.getRaw());
// console.log(block.signature);
logger.info('Posted block ' + block.quickDescription());
multicaster().sendKeyblock(peer, block, next);
},
], done);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment