Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions crates/blockchain/blockchain.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1138,13 +1138,16 @@ impl Blockchain {
block: &Block,
chain_config: &ChainConfig,
vm: &mut Evm,
skip_receipt_validation: bool,
) -> Result<BlockExecutionResult, ChainError> {
// Validate the block pre-execution
validate_block_pre_execution(block, parent_header, chain_config, ELASTICITY_MULTIPLIER)?;
let (execution_result, bal) = vm.execute_block(block)?;
// Validate execution went alright
validate_gas_used(execution_result.block_gas_used, &block.header)?;
validate_receipts_root(&block.header, &execution_result.receipts, &NativeCrypto)?;
if !skip_receipt_validation {
validate_receipts_root(&block.header, &execution_result.receipts, &NativeCrypto)?;
}
validate_requests_hash(&block.header, chain_config, &execution_result.requests)?;
if let Some(bal) = &bal {
validate_block_access_list_hash(
Expand Down Expand Up @@ -2211,7 +2214,7 @@ impl Blockchain {
};

let BlockExecutionResult { receipts, .. } = self
.execute_block_from_state(&parent_header, block, &chain_config, &mut vm)
.execute_block_from_state(&parent_header, block, &chain_config, &mut vm, true)
.map_err(|err| {
(
err,
Expand Down
Loading