Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

storage-api: update BlockReaderIdExt #11110

Merged
merged 1 commit into from
Sep 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -1229,7 +1229,7 @@ where

impl<N: NodeTypesWithDB> BlockReaderIdExt for BlockchainProvider2<N>
where
Self: BlockReader + BlockIdReader + ReceiptProviderIdExt,
Self: BlockReader + ReceiptProviderIdExt,
{
fn block_by_id(&self, id: BlockId) -> ProviderResult<Option<Block>> {
match id {
Expand Down
2 changes: 1 addition & 1 deletion crates/storage/provider/src/providers/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -798,7 +798,7 @@ where

impl<N: ProviderNodeTypes> BlockReaderIdExt for BlockchainProvider<N>
where
Self: BlockReader + BlockIdReader + ReceiptProviderIdExt,
Self: BlockReader + ReceiptProviderIdExt,
{
fn block_by_id(&self, id: BlockId) -> ProviderResult<Option<Block>> {
match id {
Expand Down
6 changes: 3 additions & 3 deletions crates/storage/storage-api/src/block.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use crate::{
BlockIdReader, BlockNumReader, HeaderProvider, ReceiptProvider, ReceiptProviderIdExt,
RequestsProvider, TransactionVariant, TransactionsProvider, WithdrawalsProvider,
BlockNumReader, HeaderProvider, ReceiptProvider, ReceiptProviderIdExt, RequestsProvider,
TransactionVariant, TransactionsProvider, WithdrawalsProvider,
};
use alloy_eips::{BlockHashOrNumber, BlockId, BlockNumberOrTag};
use alloy_primitives::{BlockNumber, B256};
Expand Down Expand Up @@ -161,7 +161,7 @@ pub trait BlockReader:
/// `BlockIdReader` methods should be used to resolve `BlockId`s to block numbers or hashes, and
/// retrieving the block should be done using the type's `BlockReader` methods.
#[auto_impl::auto_impl(&, Arc)]
pub trait BlockReaderIdExt: BlockReader + BlockIdReader + ReceiptProviderIdExt {
pub trait BlockReaderIdExt: BlockReader + ReceiptProviderIdExt {
/// Returns the block with matching tag from the database
///
/// Returns `None` if block is not found.
Expand Down
Loading