Skip to content

Commit

Permalink
default to empty if holocene is disabled for op
Browse files Browse the repository at this point in the history
  • Loading branch information
rkrasiuk committed Dec 11, 2024
1 parent e4e8c21 commit 55107ea
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions crates/optimism/payload/src/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -195,11 +195,7 @@ where
let (initialized_cfg, initialized_block_env) =
self.cfg_and_block_env(&attributes, &parent).map_err(PayloadBuilderError::other)?;

let config = PayloadConfig {
parent_header: Arc::new(parent),
attributes,
extra_data: Default::default(),
};
let config = PayloadConfig { parent_header: Arc::new(parent), attributes };
let ctx = OpPayloadBuilderCtx {
evm_config: self.evm_config.clone(),
chain_spec: client.chain_spec(),
Expand Down Expand Up @@ -621,7 +617,7 @@ impl<EvmConfig> OpPayloadBuilderCtx<EvmConfig> {

/// Returns the extra data for the block.
///
/// After holocene this extracts the extradata from the paylpad
/// After holocene this extracts the extra data from the payload
pub fn extra_data(&self) -> Result<Bytes, PayloadBuilderError> {
if self.is_holocene_active() {
self.attributes()
Expand All @@ -632,7 +628,7 @@ impl<EvmConfig> OpPayloadBuilderCtx<EvmConfig> {
)
.map_err(PayloadBuilderError::other)
} else {
Ok(self.config.extra_data.clone())
Ok(Default::default())
}
}

Expand Down

0 comments on commit 55107ea

Please sign in to comment.