From bae79ec53d6afea12bb627d126ad8b8a3dd25bf4 Mon Sep 17 00:00:00 2001 From: Matthias Seitz Date: Tue, 11 Feb 2025 16:29:22 +0100 Subject: [PATCH] fix: use generic table types (#14413) Co-authored-by: Arsenii Kulikov --- .../src/providers/static_file/manager.rs | 29 ++++++++++--------- 1 file changed, 16 insertions(+), 13 deletions(-) diff --git a/crates/storage/provider/src/providers/static_file/manager.rs b/crates/storage/provider/src/providers/static_file/manager.rs index 54a191177..1c959e4ec 100644 --- a/crates/storage/provider/src/providers/static_file/manager.rs +++ b/crates/storage/provider/src/providers/static_file/manager.rs @@ -662,6 +662,7 @@ impl StaticFileProvider { ) -> ProviderResult> where Provider: DBProvider + BlockReader + StageCheckpointReader + ChainSpecProvider, + N: NodePrimitives, { // 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 StaticFileProvider { } 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>( + provider, + segment, + highest_block, + highest_block, + )?, StaticFileSegment::Transactions => self - .ensure_invariants::<_, tables::Transactions>( + .ensure_invariants::<_, tables::Transactions>( + provider, + segment, + highest_tx, + highest_block, + )?, + StaticFileSegment::Receipts => self + .ensure_invariants::<_, tables::Receipts>( 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,