Skip to content
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

feat(provider): BlockReader::sealed_block_with_senders_range #8750

Merged
merged 6 commits into from
Jun 11, 2024
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
6 changes: 6 additions & 0 deletions crates/primitives/src/header.rs
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,12 @@ pub struct Header {
pub extra_data: Bytes,
}

impl AsRef<Self> for Header {
fn as_ref(&self) -> &Self {
self
}
}

impl Default for Header {
fn default() -> Self {
Self {
Expand Down
2 changes: 1 addition & 1 deletion crates/stages/stages/src/stages/execution.rs
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,7 @@ where
// Prepare the input for post unwind commit hook, where an `ExExNotification` will be sent.
if self.exex_manager_handle.has_exexs() {
// Get the blocks for the unwound range.
let blocks = provider.get_take_block_range::<false>(range.clone())?;
shekhirin marked this conversation as resolved.
Show resolved Hide resolved
let blocks = provider.sealed_block_with_senders_range(range.clone())?;
let previous_input = self.post_unwind_commit_input.replace(Chain::new(
blocks,
bundle_state_with_receipts,
Expand Down
7 changes: 7 additions & 0 deletions crates/storage/provider/src/providers/database/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -339,6 +339,13 @@ impl<DB: Database> BlockReader for ProviderFactory<DB> {
) -> ProviderResult<Vec<BlockWithSenders>> {
self.provider()?.block_with_senders_range(range)
}

fn sealed_block_with_senders_range(
&self,
range: RangeInclusive<BlockNumber>,
) -> ProviderResult<Vec<SealedBlockWithSenders>> {
self.provider()?.sealed_block_with_senders_range(range)
}
}

impl<DB: Database> TransactionsProvider for ProviderFactory<DB> {
Expand Down
Loading
Loading