File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
src/main/scala/io/iohk/ethereum/consensus Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -37,6 +37,7 @@ import io.iohk.ethereum.ledger.BlockValidation
3737import io .iohk .ethereum .mpt .MerklePatriciaTrie .MissingNodeException
3838import io .iohk .ethereum .utils .BlockchainConfig
3939import io .iohk .ethereum .utils .ByteStringUtils
40+ import io .iohk .ethereum .utils .FunctorOps ._
4041import io .iohk .ethereum .utils .Logger
4142
4243class ConsensusImpl (
@@ -100,12 +101,11 @@ class ConsensusImpl(
100101 blockchainConfig : BlockchainConfig
101102 ): Task [Either [ValidationBeforeExecError , BlockExecutionSuccess ]] =
102103 Task
103- .evalOnce {
104- val validationResult = blockValidation.validateBlockBeforeExecution(block)
105- validationResult.left.foreach { error =>
104+ .evalOnce(blockValidation.validateBlockBeforeExecution(block))
105+ .tap {
106+ case Left ( error) =>
106107 log.error(" Error while validating block with hash {} before execution: {}" , block.hash, error.reason)
107- }
108- validationResult
108+ case Right (_) => log.debug(" Block with hash {} validated successfully" , block.hash)
109109 }
110110 .executeOn(validationScheduler)
111111
You can’t perform that action at this time.
0 commit comments