feat: add executed block to built payload trait (#10161)

This commit is contained in:
Matthias Seitz
2024-08-07 14:22:44 +02:00
committed by GitHub
parent 4107df8148
commit 9ad7ebbbc6
3 changed files with 8 additions and 0 deletions

1
Cargo.lock generated
View File

@ -8035,6 +8035,7 @@ dependencies = [
name = "reth-payload-primitives"
version = "1.0.4"
dependencies = [
"reth-chain-state",
"reth-chainspec",
"reth-errors",
"reth-primitives",

View File

@ -18,6 +18,7 @@ reth-errors.workspace = true
reth-primitives.workspace = true
reth-transaction-pool.workspace = true
reth-rpc-types.workspace = true
reth-chain-state.workspace = true
# async
tokio = { workspace = true, features = ["sync"] }

View File

@ -1,3 +1,4 @@
use reth_chain_state::ExecutedBlock;
use reth_chainspec::ChainSpec;
use reth_primitives::{
revm_primitives::{BlockEnv, CfgEnvWithHandlerCfg},
@ -20,6 +21,11 @@ pub trait BuiltPayload: Send + Sync + std::fmt::Debug {
/// Returns the fees collected for the built block
fn fees(&self) -> U256;
/// Returns the entire execution data for the built block, if available.
fn executed_block(&self) -> Option<ExecutedBlock> {
None
}
}
/// This can be implemented by types that describe a currently running payload job.