Skip to content

Commit

Permalink
feat: add executed block to built payload trait (paradigmxyz#10161)
Browse files Browse the repository at this point in the history
  • Loading branch information
mattsse authored Aug 7, 2024
1 parent 4107df8 commit 9ad7ebb
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions crates/payload/primitives/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"] }
Expand Down
6 changes: 6 additions & 0 deletions crates/payload/primitives/src/traits.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
use reth_chain_state::ExecutedBlock;
use reth_chainspec::ChainSpec;
use reth_primitives::{
revm_primitives::{BlockEnv, CfgEnvWithHandlerCfg},
Expand All @@ -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.
Expand Down

0 comments on commit 9ad7ebb

Please sign in to comment.