From bb27f37cc703789eb41bb084892d44f770868e7d Mon Sep 17 00:00:00 2001 From: nk_ysg Date: Mon, 23 Sep 2024 17:47:15 +0800 Subject: [PATCH] storage-api: update BlockReaderIdExt (#11110) --- .../storage/provider/src/providers/blockchain_provider.rs | 2 +- crates/storage/provider/src/providers/mod.rs | 2 +- crates/storage/storage-api/src/block.rs | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/crates/storage/provider/src/providers/blockchain_provider.rs b/crates/storage/provider/src/providers/blockchain_provider.rs index 65fe31dd04..c85ba9b5b8 100644 --- a/crates/storage/provider/src/providers/blockchain_provider.rs +++ b/crates/storage/provider/src/providers/blockchain_provider.rs @@ -1229,7 +1229,7 @@ where impl BlockReaderIdExt for BlockchainProvider2 where - Self: BlockReader + BlockIdReader + ReceiptProviderIdExt, + Self: BlockReader + ReceiptProviderIdExt, { fn block_by_id(&self, id: BlockId) -> ProviderResult> { match id { diff --git a/crates/storage/provider/src/providers/mod.rs b/crates/storage/provider/src/providers/mod.rs index 35b8080305..d483c9ee18 100644 --- a/crates/storage/provider/src/providers/mod.rs +++ b/crates/storage/provider/src/providers/mod.rs @@ -798,7 +798,7 @@ where impl BlockReaderIdExt for BlockchainProvider where - Self: BlockReader + BlockIdReader + ReceiptProviderIdExt, + Self: BlockReader + ReceiptProviderIdExt, { fn block_by_id(&self, id: BlockId) -> ProviderResult> { match id { diff --git a/crates/storage/storage-api/src/block.rs b/crates/storage/storage-api/src/block.rs index 82eccaa55a..50d86f914c 100644 --- a/crates/storage/storage-api/src/block.rs +++ b/crates/storage/storage-api/src/block.rs @@ -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}; @@ -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.