Skip to content
This repository has been archived by the owner on Jun 11, 2024. It is now read-only.

Commit

Permalink
Improve log for blocks received from other chain
Browse files Browse the repository at this point in the history
  • Loading branch information
4miners committed Aug 20, 2017
1 parent db3c776 commit af9f778
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion modules/blocks/process.js
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,13 @@ Process.prototype.onReceiveBlock = function (block) {
if (block.id === lastBlock.id) {
library.logger.debug('Block already processed', block.id);
} else {
library.logger.error('Block discarded', block.id);
library.logger.warn([
'Discarded block that does not match with current chain:', block.id,
'height:', block.height,
'round:', modules.rounds.calc(block.height),
'slot:', slots.getSlotNumber(block.timestamp),
'generator:', block.generatorPublicKey
].join(' '));
}

// Discard received block
Expand Down

0 comments on commit af9f778

Please sign in to comment.