mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
fix: use generic table types (#14413)
Co-authored-by: Arsenii Kulikov <klkvrr@gmail.com>
This commit is contained in:
@ -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,
|
||||
|
||||
Reference in New Issue
Block a user