File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -160,13 +160,16 @@ impl BlockExecutionError {
160160 /// Handles an EVM error occurred when executing a transaction.
161161 ///
162162 /// If an error matches [`EvmError::InvalidTransaction`], it will be wrapped into
163- /// [`BlockValidationError::InvalidTx`], otherwise into [`InternalBlockExecutionError::EVM`].
163+ /// [`BlockValidationError::InvalidTx`], otherwise if [`EvmError::is_fatal`] return `true`, the
164+ /// error would be wrapped into [`InternalBlockExecutionError::EVM`], otherwise it would be
165+ /// wrapped into [`BlockValidationError::EVM`].
164166 pub fn evm < E : EvmError > ( error : E , hash : B256 ) -> Self {
165167 match error. try_into_invalid_tx_err ( ) {
166168 Ok ( err) => {
167169 Self :: Validation ( BlockValidationError :: InvalidTx { hash, error : Box :: new ( err) } )
168170 }
169171 Err ( err) => {
172+ // Route errors based on whether they are fatal or not.
170173 if err. is_fatal ( ) {
171174 Self :: Internal ( InternalBlockExecutionError :: EVM { hash, error : Box :: new ( err) } )
172175 } else {
You can’t perform that action at this time.
0 commit comments