Skip to content

Commit e58ad19

Browse files
committed
Revert "add get_block_number_by_id to provider"
This reverts commit b1718ad.
1 parent 52232e5 commit e58ad19

File tree

1 file changed

+0
-19
lines changed

1 file changed

+0
-19
lines changed

src/robust_provider/provider.rs

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -98,25 +98,6 @@ impl<N: Network> RobustProvider<N> {
9898
result
9999
}
100100

101-
/// Get the block number for a given block identifier.
102-
///
103-
/// # Errors
104-
///
105-
/// See [retry errors](#retry-errors).
106-
pub async fn get_block_number_by_id(&self, id: BlockId) -> Result<u64, Error> {
107-
info!("get_block_number_by_id called");
108-
let result = self
109-
.retry_with_total_timeout(
110-
move |provider| async move { provider.get_block_number_by_id(id).await },
111-
false,
112-
)
113-
.await;
114-
if let Err(e) = &result {
115-
error!(error = %e, "get_block_number_by_id failed");
116-
}
117-
result?.ok_or_else(|| Error::BlockNotFound(id))
118-
}
119-
120101
/// Fetch the latest confirmed block number with retry and timeout.
121102
///
122103
/// This method fetches the latest block number and subtracts the specified

0 commit comments

Comments
 (0)