Skip to content

docs(l1): latest valid ancestor store methods #2669

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 6, 2025
Merged
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
3 changes: 3 additions & 0 deletions crates/storage/store.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1074,13 +1074,16 @@ impl Store {
self.engine.read_storage_snapshot(account_hash, start).await
}

/// Fetches the latest valid ancestor for a block that was previously marked as invalid
/// Returns None if the block was never marked as invalid
pub async fn get_latest_valid_ancestor(
&self,
block: BlockHash,
) -> Result<Option<BlockHash>, StoreError> {
self.engine.get_latest_valid_ancestor(block).await
}

/// Marks a block as invalid and sets its latest valid ancestor
pub async fn set_latest_valid_ancestor(
&self,
bad_block: BlockHash,
Expand Down
Loading