mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
feat: add append_receipts function (#8718)
Co-authored-by: Alexey Shekhirin <a.shekhirin@gmail.com>
This commit is contained in:
@ -42,11 +42,9 @@ impl<DB: Database> Segment<DB> for Receipts {
|
||||
let mut receipts_cursor = provider.tx_ref().cursor_read::<tables::Receipts>()?;
|
||||
let receipts_walker = receipts_cursor.walk_range(block_body_indices.tx_num_range())?;
|
||||
|
||||
for entry in receipts_walker {
|
||||
let (tx_number, receipt) = entry?;
|
||||
|
||||
static_file_writer.append_receipt(tx_number, receipt)?;
|
||||
}
|
||||
static_file_writer.append_receipts(
|
||||
receipts_walker.map(|result| result.map_err(ProviderError::from)),
|
||||
)?;
|
||||
}
|
||||
|
||||
Ok(())
|
||||
|
||||
Reference in New Issue
Block a user