File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed
testnet/stacks-node/src/tests Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -61,11 +61,11 @@ impl HttpRequest for RPCNakamotoBlockByHeightRequestHandler {
61
61
}
62
62
63
63
fn path_regex ( & self ) -> Regex {
64
- Regex :: new ( r#"^/v3/blockbyheight /(?P<block_height>[0-9]{1,20})$"# ) . unwrap ( )
64
+ Regex :: new ( r#"^/v3/blocks/height /(?P<block_height>[0-9]{1,20})$"# ) . unwrap ( )
65
65
}
66
66
67
67
fn metrics_identifier ( & self ) -> & str {
68
- "/v3/blockbyheight /:block_height"
68
+ "/v3/blocks/height /:block_height"
69
69
}
70
70
71
71
/// Try to decode this request.
@@ -212,7 +212,7 @@ impl StacksHttpRequest {
212
212
StacksHttpRequest :: new_for_peer (
213
213
host,
214
214
"GET" . into ( ) ,
215
- format ! ( "/v3/blockbyheight /{}" , block_height) ,
215
+ format ! ( "/v3/blocks/height /{}" , block_height) ,
216
216
HttpRequestContents :: new ( ) . for_tip ( tip) ,
217
217
)
218
218
. expect ( "FATAL: failed to construct request from infallible data" )
Original file line number Diff line number Diff line change @@ -9426,7 +9426,7 @@ fn v3_blockbyhash_api_endpoint() {
9426
9426
run_loop_thread. join ( ) . unwrap ( ) ;
9427
9427
}
9428
9428
9429
- /// Test `/v3/blockbyheight ` API endpoint
9429
+ /// Test `/v3/blocks/height ` API endpoint
9430
9430
///
9431
9431
/// This endpoint returns the block blob given a height
9432
9432
#[ test]
@@ -9519,7 +9519,7 @@ fn v3_blockbyheight_api_endpoint() {
9519
9519
let http_origin = format ! ( "http://{}" , & conf. node. rpc_bind) ;
9520
9520
9521
9521
let get_v3_block_by_height = |height : u64 | {
9522
- let url = & format ! ( "{http_origin}/v3/blockbyheight /{height}" ) ;
9522
+ let url = & format ! ( "{http_origin}/v3/blocks/height /{height}" ) ;
9523
9523
info ! ( "Send request: GET {url}" ) ;
9524
9524
reqwest:: blocking:: get ( url) . unwrap_or_else ( |e| panic ! ( "GET request failed: {e}" ) )
9525
9525
} ;
You can’t perform that action at this time.
0 commit comments