Skip to content

Commit f7cdbac

Browse files
committed
Incorrect path was passed to new_rpc_call_timer calling out of bounds array access
Signed-off-by: Jacinta Ferrant <[email protected]>
1 parent 5e6c689 commit f7cdbac

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

stacks-signer/src/client/stacks_client.rs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -376,10 +376,12 @@ impl StacksClient {
376376
"last_sortition" => %last_sortition,
377377
);
378378
let path = self.tenure_forking_info_path(chosen_parent, last_sortition);
379-
let timer = crate::monitoring::new_rpc_call_timer(
380-
"/v3/tenures/fork_info/:start/:stop",
381-
&self.http_origin,
379+
// Use a seperate metrics path to allow the same metric for different start and stop hashes
380+
let metrics_path = format!(
381+
"{}{RPC_TENURE_FORKING_INFO_PATH}/:start/:stop",
382+
self.http_origin
382383
);
384+
let timer = crate::monitoring::new_rpc_call_timer(&metrics_path, &self.http_origin);
383385
let send_request = || {
384386
self.stacks_node_client
385387
.get(&path)

0 commit comments

Comments
 (0)