File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
src/main/scala/io/iohk/ethereum/ledger Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -5,8 +5,10 @@ import io.iohk.ethereum.ledger.BlockExecutionError.MissingParentError
5
5
import io .iohk .ethereum .ledger .Ledger .BlockResult
6
6
import io .iohk .ethereum .utils .{BlockchainConfig , DaoForkConfig , Logger }
7
7
import io .iohk .ethereum .vm .EvmConfig
8
+
8
9
import scala .annotation .tailrec
9
10
import cats .implicits ._
11
+ import io .iohk .ethereum .mpt .MerklePatriciaTrie .MPTException
10
12
11
13
class BlockExecution (
12
14
blockchain : BlockchainImpl ,
@@ -61,7 +63,7 @@ class BlockExecution(
61
63
.toRight(MissingParentError ) // Should not never occur because validated earlier
62
64
execResult <- executeBlockTransactions(block, parent)
63
65
worldToPersist <- Either
64
- .catchOnly[Throwable ](blockPreparator.payBlockReward(block, execResult.worldState))
66
+ .catchOnly[MPTException ](blockPreparator.payBlockReward(block, execResult.worldState))
65
67
.leftMap(BlockExecutionError .MPTError .apply)
66
68
// State root hash needs to be up-to-date for validateBlockAfterExecution
67
69
worldPersisted = InMemoryWorldStateProxy .persistState(worldToPersist)
@@ -188,5 +190,5 @@ object BlockExecutionError {
188
190
override val reason : Any = " Cannot find parent"
189
191
}
190
192
191
- final case class MPTError (reason : Throwable ) extends BlockExecutionError
193
+ final case class MPTError (reason : MPTException ) extends BlockExecutionError
192
194
}
You can’t perform that action at this time.
0 commit comments