diff --git a/crates/storage/provider/src/providers/static_file/manager.rs b/crates/storage/provider/src/providers/static_file/manager.rs index 54a1911777f52..1c959e4ec0564 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,