fix: use generic receipt in StaticFileProducer (#13324)

This commit is contained in:
Arsenii Kulikov
2024-12-12 02:08:09 +04:00
committed by GitHub
parent c553b1e86d
commit 328d4937f2
4 changed files with 30 additions and 9 deletions

View File

@ -11,7 +11,7 @@ use reth_nippy_jar::{NippyJar, NippyJarError, NippyJarWriter};
use reth_node_types::NodePrimitives;
use reth_primitives::{
static_file::{SegmentHeader, SegmentRangeInclusive},
Receipt, StaticFileSegment,
StaticFileSegment,
};
use reth_storage_errors::provider::{ProviderError, ProviderResult};
use std::{
@ -615,7 +615,8 @@ impl<N: NodePrimitives> StaticFileProviderRW<N> {
pub fn append_receipts<I, R>(&mut self, receipts: I) -> ProviderResult<Option<TxNumber>>
where
I: Iterator<Item = Result<(TxNumber, R), ProviderError>>,
R: Borrow<Receipt>,
R: Borrow<N::Receipt>,
N::Receipt: Compact,
{
debug_assert!(self.writer.user_header().segment() == StaticFileSegment::Receipts);