feat: expose InvalidTxError in BlockExecutionError (#14597)

This commit is contained in:
Arsenii Kulikov
2025-02-20 13:22:22 +04:00
committed by GitHub
parent d075995205
commit 7ee8461bac
9 changed files with 45 additions and 24 deletions

View File

@ -154,10 +154,8 @@ where
let hash = tx.hash();
// Execute transaction.
let result_and_state = self.evm.transact(tx_env).map_err(move |err| {
// Ensure hash is calculated for error log, if not already done
BlockValidationError::EVM { hash: *hash, error: Box::new(err) }
})?;
let result_and_state =
self.evm.transact(tx_env).map_err(move |err| BlockExecutionError::evm(err, *hash))?;
self.system_caller
.on_state(StateChangeSource::Transaction(self.receipts.len()), &result_and_state.state);
let ResultAndState { result, state } = result_and_state;