mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
feat: add impl From BlockExecutionOutput for ExecutionOutcome (#10507)
This commit is contained in:
@ -45,7 +45,7 @@ mod task;
|
||||
|
||||
pub use crate::client::AutoSealClient;
|
||||
pub use mode::{FixedBlockTimeMiner, MiningMode, ReadyTransactionMiner};
|
||||
use reth_evm::execute::{BlockExecutionOutput, BlockExecutorProvider, Executor};
|
||||
use reth_evm::execute::{BlockExecutorProvider, Executor};
|
||||
pub use task::MiningTask;
|
||||
|
||||
/// A consensus implementation intended for local development and testing purposes.
|
||||
@ -374,19 +374,10 @@ impl StorageInner {
|
||||
);
|
||||
|
||||
// execute the block
|
||||
let BlockExecutionOutput {
|
||||
state,
|
||||
receipts,
|
||||
requests: block_execution_requests,
|
||||
gas_used,
|
||||
..
|
||||
} = executor.executor(&mut db).execute((&block, U256::ZERO).into())?;
|
||||
let execution_outcome = ExecutionOutcome::new(
|
||||
state,
|
||||
receipts.into(),
|
||||
block.number,
|
||||
vec![block_execution_requests.into()],
|
||||
);
|
||||
let block_execution_output =
|
||||
executor.executor(&mut db).execute((&block, U256::ZERO).into())?;
|
||||
let gas_used = block_execution_output.gas_used;
|
||||
let execution_outcome = ExecutionOutcome::from((block_execution_output, block.number));
|
||||
|
||||
// todo(onbjerg): we should not pass requests around as this is building a block, which
|
||||
// means we need to extract the requests from the execution output and compute the requests
|
||||
|
||||
Reference in New Issue
Block a user