Skip to content

Commit 3072fd0

Browse files
committed
Use variable name consistently: block_height
1 parent afbc028 commit 3072fd0

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

src/async.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -204,15 +204,15 @@ impl AsyncClient {
204204
}
205205

206206
/// Get the [`BlockHash`] of a specific block height
207-
pub async fn get_block_hash(&self, height: u32) -> Result<BlockHash, Error> {
207+
pub async fn get_block_hash(&self, block_height: u32) -> Result<BlockHash, Error> {
208208
let resp = self
209209
.client
210-
.get(&format!("{}/block-height/{}", self.url, height))
210+
.get(&format!("{}/block-height/{}", self.url, block_height))
211211
.send()
212212
.await?;
213213

214214
if let StatusCode::NOT_FOUND = resp.status() {
215-
return Err(Error::HeaderHeightNotFound(height));
215+
return Err(Error::HeaderHeightNotFound(block_height));
216216
}
217217

218218
Ok(BlockHash::from_str(

src/blocking.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -228,15 +228,15 @@ impl BlockingClient {
228228
}
229229

230230
/// Get the [`BlockHash`] of a specific block height
231-
pub fn get_block_hash(&self, height: u32) -> Result<BlockHash, Error> {
231+
pub fn get_block_hash(&self, block_height: u32) -> Result<BlockHash, Error> {
232232
let resp = self
233233
.agent
234-
.get(&format!("{}/block-height/{}", self.url, height))
234+
.get(&format!("{}/block-height/{}", self.url, block_height))
235235
.call();
236236

237237
if let Err(ureq::Error::Status(code, _)) = resp {
238238
if is_status_not_found(code) {
239-
return Err(Error::HeaderHeightNotFound(height));
239+
return Err(Error::HeaderHeightNotFound(block_height));
240240
}
241241
}
242242

0 commit comments

Comments
 (0)