Skip to content

Commit

Permalink
fix: use generic table types (paradigmxyz#14413)
Browse files Browse the repository at this point in the history
Co-authored-by: Arsenii Kulikov <klkvrr@gmail.com>
  • Loading branch information
2 people authored and 18aaddy committed Feb 12, 2025
1 parent 0959ba0 commit 0b0998a
Showing 1 changed file with 16 additions and 13 deletions.
29 changes: 16 additions & 13 deletions crates/storage/provider/src/providers/static_file/manager.rs
Original file line number Diff line number Diff line change
Expand Up @@ -662,6 +662,7 @@ impl<N: NodePrimitives> StaticFileProvider<N> {
) -> ProviderResult<Option<PipelineTarget>>
where
Provider: DBProvider + BlockReader + StageCheckpointReader + ChainSpecProvider,
N: NodePrimitives<Receipt: Value, BlockHeader: Value, SignedTx: Value>,
{
// OVM historical import is broken and does not work with this check. It's importing
// duplicated receipts resulting in having more receipts than the expected transaction
Expand Down Expand Up @@ -775,25 +776,27 @@ impl<N: NodePrimitives> StaticFileProvider<N> {
}

if let Some(unwind) = match segment {
StaticFileSegment::Headers => self.ensure_invariants::<_, tables::Headers>(
provider,
segment,
highest_block,
highest_block,
)?,
StaticFileSegment::Headers => self
.ensure_invariants::<_, tables::Headers<N::BlockHeader>>(
provider,
segment,
highest_block,
highest_block,
)?,
StaticFileSegment::Transactions => self
.ensure_invariants::<_, tables::Transactions>(
.ensure_invariants::<_, tables::Transactions<N::SignedTx>>(
provider,
segment,
highest_tx,
highest_block,
)?,
StaticFileSegment::Receipts => self
.ensure_invariants::<_, tables::Receipts<N::Receipt>>(
provider,
segment,
highest_tx,
highest_block,
)?,
StaticFileSegment::Receipts => self.ensure_invariants::<_, tables::Receipts>(
provider,
segment,
highest_tx,
highest_block,
)?,
StaticFileSegment::BlockMeta => self
.ensure_invariants::<_, tables::BlockBodyIndices>(
provider,
Expand Down

0 comments on commit 0b0998a

Please sign in to comment.