Skip to content

Commit 973c768

Browse files
notmandatorytnull
authored andcommitted
chore: remove deprecated get_header() function
1 parent df9c694 commit 973c768

File tree

2 files changed

+0
-20
lines changed

2 files changed

+0
-20
lines changed

src/async.rs

-10
Original file line numberDiff line numberDiff line change
@@ -131,16 +131,6 @@ impl AsyncClient {
131131
}
132132
}
133133

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

src/blocking.rs

-10
Original file line numberDiff line numberDiff line change
@@ -198,16 +198,6 @@ impl BlockingClient {
198198
self.get_response_json(&format!("/tx/{}/status", txid))
199199
}
200200

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

0 commit comments

Comments
 (0)