Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .github/workflows/cov-op-historical-proof.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
name: coverage-op-historical-proof

on:
merge_group:
push:
branches: [ unstable, main]
pull_request:
workflow_dispatch:

jobs:
Expand Down
26 changes: 26 additions & 0 deletions crates/optimism/exex/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -847,4 +847,30 @@ mod tests {
let exex = build_test_exex(ctx, proofs.clone());
exex.ensure_initialized().await.expect("should not return error");
}

#[tokio::test]
async fn handle_notification_errors_on_empty_storage() {
// MDBX proofs storage - empty
let dir = tempdir_path();
let store = Arc::new(MdbxProofsStorage::new(dir.as_path()).expect("env"));
let proofs: OpProofsStorage<Arc<MdbxProofsStorage>> = store.clone().into();

let (ctx, _handle) =
reth_exex_test_utils::test_exex_context().await.expect("exex test context");

let collector = LiveTrieCollector::new(
ctx.components.components.evm_config.clone(),
ctx.components.provider.clone(),
&proofs,
);

let exex = build_test_exex(ctx, proofs.clone());

// Any notification will do
let new_chain = Arc::new(mk_chain_with_updates(1, 5, None));
let notif = ExExNotification::ChainCommitted { new: new_chain };

let err = exex.handle_notification(notif, &collector).await.unwrap_err();
assert_eq!(err.to_string(), "No blocks stored in proofs storage");
}
}
Loading