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

Commit

Permalink
Merge pull request #4076 from LiskHQ/4074-add_logs_for_new_blocks
Browse files Browse the repository at this point in the history
Add logs for new blocks - Closes #4074
  • Loading branch information
shuse2 authored Aug 14, 2019
2 parents 526ad7f + 138e66a commit 123fcb4
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions framework/src/modules/chain/chain.js
Original file line number Diff line number Diff line change
Expand Up @@ -487,6 +487,10 @@ module.exports = class Chain {
block.transactions,
);
}
this.logger.info(
{ id: block.id, height: block.height },
'Deleted a block from the chain',
);
this.channel.publish('chain:blocks:change', block);
});

Expand All @@ -498,6 +502,14 @@ module.exports = class Chain {
block.transactions,
);
}
this.logger.info(
{
id: block.id,
height: block.height,
numberOfTransactions: block.transactions.length,
},
'New block added to the chain',
);
this.channel.publish('chain:blocks:change', block);
});

Expand All @@ -511,6 +523,10 @@ module.exports = class Chain {

this.blocks.on(EVENT_NEW_BROADHASH, ({ broadhash, height }) => {
this.channel.invoke('app:updateApplicationState', { broadhash, height });
this.logger.debug(
{ broadhash, height },
'Updating the application state',
);
});

this.transactionPool.on(EVENT_MULTISIGNATURE_SIGNATURE, signature => {
Expand Down

0 comments on commit 123fcb4

Please sign in to comment.