Skip to content

Commit

Permalink
fix: bump (#865)
Browse files Browse the repository at this point in the history
  • Loading branch information
refcell authored Dec 3, 2024
1 parent 380ab2b commit 2b7023d
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 8 deletions.
4 changes: 2 additions & 2 deletions crates/driver/src/core.rs
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ where
};

self.executor.update_safe_head(self.cursor.l2_safe_head_header().clone());
let header = match self.executor.execute_payload(attributes.clone()) {
let header = match self.executor.execute_payload(attributes.clone()).await {
Ok(header) => header,
Err(e) => {
error!(target: "client", "Failed to execute L2 block: {}", e);
Expand All @@ -133,7 +133,7 @@ where

// Retry the execution.
self.executor.update_safe_head(self.cursor.l2_safe_head_header().clone());
match self.executor.execute_payload(attributes.clone()) {
match self.executor.execute_payload(attributes.clone()).await {
Ok(header) => header,
Err(e) => {
error!(
Expand Down
5 changes: 4 additions & 1 deletion crates/driver/src/executor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,10 @@ pub trait Executor {
fn update_safe_head(&mut self, header: Sealed<Header>);

/// Execute the gicen [OpPayloadAttributes].
fn execute_payload(&mut self, attributes: OpPayloadAttributes) -> Result<&Header, Self::Error>;
async fn execute_payload(
&mut self,
attributes: OpPayloadAttributes,
) -> Result<Header, Self::Error>;

/// Computes the output root.
/// Expected to be called after the payload has been executed.
Expand Down
16 changes: 11 additions & 5 deletions crates/proof-sdk/proof/src/executor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -79,11 +79,17 @@ where
}

/// Execute the given payload attributes.
fn execute_payload(&mut self, attributes: OpPayloadAttributes) -> Result<&Header, Self::Error> {
self.inner.as_mut().map_or_else(
|| Err(kona_executor::ExecutorError::MissingExecutor),
|e| e.execute_payload(attributes),
)
async fn execute_payload(
&mut self,
attributes: OpPayloadAttributes,
) -> Result<Header, Self::Error> {
self.inner
.as_mut()
.map_or_else(
|| Err(kona_executor::ExecutorError::MissingExecutor),
|e| e.execute_payload(attributes),
)
.cloned()
}

/// Computes the output root.
Expand Down

0 comments on commit 2b7023d

Please sign in to comment.