File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -204,15 +204,15 @@ impl AsyncClient {
204
204
}
205
205
206
206
/// 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 > {
208
208
let resp = self
209
209
. client
210
- . get ( & format ! ( "{}/block-height/{}" , self . url, height ) )
210
+ . get ( & format ! ( "{}/block-height/{}" , self . url, block_height ) )
211
211
. send ( )
212
212
. await ?;
213
213
214
214
if let StatusCode :: NOT_FOUND = resp. status ( ) {
215
- return Err ( Error :: HeaderHeightNotFound ( height ) ) ;
215
+ return Err ( Error :: HeaderHeightNotFound ( block_height ) ) ;
216
216
}
217
217
218
218
Ok ( BlockHash :: from_str (
Original file line number Diff line number Diff line change @@ -228,15 +228,15 @@ impl BlockingClient {
228
228
}
229
229
230
230
/// 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 > {
232
232
let resp = self
233
233
. agent
234
- . get ( & format ! ( "{}/block-height/{}" , self . url, height ) )
234
+ . get ( & format ! ( "{}/block-height/{}" , self . url, block_height ) )
235
235
. call ( ) ;
236
236
237
237
if let Err ( ureq:: Error :: Status ( code, _) ) = resp {
238
238
if is_status_not_found ( code) {
239
- return Err ( Error :: HeaderHeightNotFound ( height ) ) ;
239
+ return Err ( Error :: HeaderHeightNotFound ( block_height ) ) ;
240
240
}
241
241
}
242
242
You can’t perform that action at this time.
0 commit comments