mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
chore: make clippy happy (#13561)
This commit is contained in:
@ -917,14 +917,7 @@ impl<N: ProviderNodeTypes> TransactionsProvider for ConsistentProvider<N> {
|
||||
id.into(),
|
||||
|provider| provider.transaction_by_id(id),
|
||||
|tx_index, _, block_state| {
|
||||
Ok(block_state
|
||||
.block_ref()
|
||||
.block()
|
||||
.body
|
||||
.transactions()
|
||||
.get(tx_index)
|
||||
.cloned()
|
||||
.map(Into::into))
|
||||
Ok(block_state.block_ref().block().body.transactions().get(tx_index).cloned())
|
||||
},
|
||||
)
|
||||
}
|
||||
@ -937,14 +930,7 @@ impl<N: ProviderNodeTypes> TransactionsProvider for ConsistentProvider<N> {
|
||||
id.into(),
|
||||
|provider| provider.transaction_by_id_unhashed(id),
|
||||
|tx_index, _, block_state| {
|
||||
Ok(block_state
|
||||
.block_ref()
|
||||
.block()
|
||||
.body
|
||||
.transactions()
|
||||
.get(tx_index)
|
||||
.cloned()
|
||||
.map(Into::into))
|
||||
Ok(block_state.block_ref().block().body.transactions().get(tx_index).cloned())
|
||||
},
|
||||
)
|
||||
}
|
||||
|
||||
@ -1042,9 +1042,7 @@ impl<TX: DbTx + 'static, N: NodeTypesForProvider> HeaderProvider for DatabasePro
|
||||
StaticFileSegment::Headers,
|
||||
to_range(range),
|
||||
|static_file, range, _| static_file.headers_range(range),
|
||||
|range, _| {
|
||||
self.cursor_read_collect::<tables::Headers<Self::Header>>(range).map_err(Into::into)
|
||||
},
|
||||
|range, _| self.cursor_read_collect::<tables::Headers<Self::Header>>(range),
|
||||
|_| true,
|
||||
)
|
||||
}
|
||||
@ -1120,9 +1118,7 @@ impl<TX: DbTx + 'static, N: NodeTypes> BlockHashReader for DatabaseProvider<TX,
|
||||
StaticFileSegment::Headers,
|
||||
start..end,
|
||||
|static_file, range, _| static_file.canonical_hashes_range(range.start, range.end),
|
||||
|range, _| {
|
||||
self.cursor_read_collect::<tables::CanonicalHeaders>(range).map_err(Into::into)
|
||||
},
|
||||
|range, _| self.cursor_read_collect::<tables::CanonicalHeaders>(range),
|
||||
|_| true,
|
||||
)
|
||||
}
|
||||
@ -1517,7 +1513,7 @@ impl<TX: DbTx + 'static, N: NodeTypesForProvider> TransactionsProvider for Datab
|
||||
&self,
|
||||
range: impl RangeBounds<TxNumber>,
|
||||
) -> ProviderResult<Vec<Address>> {
|
||||
self.cursor_read_collect::<tables::TransactionSenders>(range).map_err(Into::into)
|
||||
self.cursor_read_collect::<tables::TransactionSenders>(range)
|
||||
}
|
||||
|
||||
fn transaction_sender(&self, id: TxNumber) -> ProviderResult<Option<Address>> {
|
||||
@ -1570,10 +1566,7 @@ impl<TX: DbTx + 'static, N: NodeTypesForProvider> ReceiptProvider for DatabasePr
|
||||
StaticFileSegment::Receipts,
|
||||
to_range(range),
|
||||
|static_file, range, _| static_file.receipts_by_tx_range(range),
|
||||
|range, _| {
|
||||
self.cursor_read_collect::<tables::Receipts<Self::Receipt>>(range)
|
||||
.map_err(Into::into)
|
||||
},
|
||||
|range, _| self.cursor_read_collect::<tables::Receipts<Self::Receipt>>(range),
|
||||
|_| true,
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user