Skip to content

Commit

Permalink
add where clause
Browse files Browse the repository at this point in the history
  • Loading branch information
sergerad committed Oct 25, 2024
1 parent 904c6c5 commit 99dbbc2
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
6 changes: 5 additions & 1 deletion zero/src/block_interval.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,11 @@ mod block_interval_provider_impl {
use super::{Block, BlockId, BlockIntervalProvider};

/// Implements the [`BlockIntervalProvider`] trait for [`Provider`].
impl<T: Transport + Clone, P: Provider<T>> BlockIntervalProvider<T> for P {
impl<T, P> BlockIntervalProvider<T> for P
where
T: Transport + Clone,
P: Provider<T>,
{
/// Retrieves block without transaction contents from the provider.
async fn get_block_by_id(&self, block_id: BlockId) -> anyhow::Result<Option<Block>> {
Ok(self
Expand Down
6 changes: 5 additions & 1 deletion zero/src/provider.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,11 @@ use crate::rpc::RpcType;
const CACHE_SIZE: usize = 1024;
const MAX_NUMBER_OF_PARALLEL_REQUESTS: usize = 128;

impl<T: Transport + Clone, R: Provider<T>> Provider<T> for CachedProvider<R, T> {
impl<T, P> Provider<T> for CachedProvider<P, T>
where
T: Transport + Clone,
P: Provider<T>,
{
fn root(&self) -> &RootProvider<T> {
self.provider.root()
}
Expand Down

0 comments on commit 99dbbc2

Please sign in to comment.