Skip to content

Commit 3519fe8

Browse files
notmandatorytnull
authored andcommitted
chore: remove deprecated get_header() function
1 parent 5a9d8cf commit 3519fe8

File tree

2 files changed

+0
-20
lines changed

2 files changed

+0
-20
lines changed

src/async.rs

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -132,16 +132,6 @@ impl AsyncClient {
132132
}
133133
}
134134

135-
#[deprecated(
136-
since = "0.2.0",
137-
note = "Deprecated to improve alignment with Esplora API. Users should use `get_block_hash` and `get_header_by_hash` methods directly."
138-
)]
139-
/// Get a [`BlockHeader`] given a particular block height.
140-
pub async fn get_header(&self, block_height: u32) -> Result<BlockHeader, Error> {
141-
let block_hash = self.get_block_hash(block_height).await?;
142-
self.get_header_by_hash(&block_hash).await
143-
}
144-
145135
/// Get a [`BlockHeader`] given a particular block hash.
146136
pub async fn get_header_by_hash(&self, block_hash: &BlockHash) -> Result<BlockHeader, Error> {
147137
let resp = self

src/blocking.rs

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -201,16 +201,6 @@ impl BlockingClient {
201201
self.get_response_json(&format!("/tx/{}/status", txid))
202202
}
203203

204-
/// Get a [`BlockHeader`] given a particular block height.
205-
#[deprecated(
206-
since = "0.2.0",
207-
note = "Deprecated to improve alignment with Esplora API. Users should use `get_block_hash` and `get_header_by_hash` methods directly."
208-
)]
209-
pub fn get_header(&self, block_height: u32) -> Result<BlockHeader, Error> {
210-
let block_hash = self.get_block_hash(block_height)?;
211-
self.get_header_by_hash(&block_hash)
212-
}
213-
214204
/// Get a [`BlockHeader`] given a particular block hash.
215205
pub fn get_header_by_hash(&self, block_hash: &BlockHash) -> Result<BlockHeader, Error> {
216206
self.get_response_hex(&format!("/block/{}/header", block_hash))

0 commit comments

Comments
 (0)