Skip to content

Commit 171ad0e

Browse files
committed
chore(client): deprecate get_blocks
1 parent f3054bc commit 171ad0e

File tree

3 files changed

+3
-0
lines changed

3 files changed

+3
-0
lines changed

src/async.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -564,6 +564,7 @@ impl<S: Sleeper> AsyncClient<S> {
564564
///
565565
/// The maximum number of summaries returned depends on the backend itself:
566566
/// esplora returns `10` while [mempool.space](https://mempool.space/docs/api) returns `15`.
567+
#[deprecated(since = "0.12.3", note = "use `get_block_infos` instead")]
567568
pub async fn get_blocks(&self, height: Option<u32>) -> Result<Vec<BlockSummary>, Error> {
568569
let path = match height {
569570
Some(height) => format!("/blocks/{height}"),

src/blocking.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -498,6 +498,7 @@ impl BlockingClient {
498498
///
499499
/// The maximum number of summaries returned depends on the backend itself:
500500
/// esplora returns `10` while [mempool.space](https://mempool.space/docs/api) returns `15`.
501+
#[deprecated(since = "0.12.3", note = "use `get_block_infos` instead")]
501502
pub fn get_blocks(&self, height: Option<u32>) -> Result<Vec<BlockSummary>, Error> {
502503
let path = match height {
503504
Some(height) => format!("/blocks/{height}"),

src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1006,6 +1006,7 @@ mod test {
10061006
assert_eq!(txs_blocking.len(), txs_async.len());
10071007
}
10081008

1009+
#[allow(deprecated)]
10091010
#[cfg(all(feature = "blocking", feature = "async"))]
10101011
#[tokio::test]
10111012
async fn test_get_blocks() {

0 commit comments

Comments
 (0)