Skip to content

Commit

Permalink
AbstractBlockChain: Print error msg before throwing BlockVersionOutOf…
Browse files Browse the repository at this point in the history
…Date exception.

Cherry pick 1829f6c
  • Loading branch information
oscarguindzberg committed May 16, 2020
1 parent dbf6c1c commit 7022b7f
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -531,6 +531,7 @@ private void connectBlock(final Block block, StoredBlock storedPrev, boolean exp
final Integer count = versionTally.getCountAtOrAbove(block.getVersion() + 1);
if (count != null
&& count >= params.getMajorityRejectBlockOutdated()) {
log.error("Block with hash {} has outdated version: version # = {}" , block.getHashAsString(), block.getVersion());
throw new VerificationException.BlockVersionOutOfDate(block.getVersion());
}
}
Expand Down

0 comments on commit 7022b7f

Please sign in to comment.