Skip to content

Commit

Permalink
changed log level to more descriptive error and added context
Browse files Browse the repository at this point in the history
Signed-off-by: Alfredo Gutierrez <[email protected]>
  • Loading branch information
AlfredoG87 committed Jan 9, 2025
1 parent f417aa3 commit e63fbf1
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,12 @@ public void onBlockItemsReceived(@NonNull List<BlockItemUnparsed> blockItems) th
BlockHeader blockHeader = BlockHeader.PROTOBUF.parse(firstItem.blockHeader());

// double check last block hash with prev of current block
// once we finish the block verification using signature, we need to re-think this as
// a side verification
if (currentSession != null) {
currentSession.getVerificationResult().thenAccept(result -> {
if (!result.blockHash().equals(blockHeader.previousBlockHash())) {
LOGGER.log(WARNING, "blockHeader.previousBlockHash does not match calculated previous hash.");
LOGGER.log(ERROR, "blockHeader.previousBlockHash does not match calculated previous hash.");
metricsService
.get(BlockNodeMetricTypes.Counter.VerificationBlocksFailed)
.increment();
Expand Down

0 comments on commit e63fbf1

Please sign in to comment.