fix: use generic table types (#14413)

Co-authored-by: Arsenii Kulikov <klkvrr@gmail.com>
This commit is contained in:
Matthias Seitz
2025-02-11 16:29:22 +01:00
committed by GitHub
parent f13158deb3
commit bae79ec53d

View File

@ -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
@ -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,