Skip to content

Commit dd97d6d

Browse files
committed
chore: match the error strings in cost errors
1 parent bf1cc79 commit dd97d6d

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

clarity/src/vm/costs/mod.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -217,8 +217,7 @@ impl DefaultVersion {
217217
};
218218

219219
CostErrors::CostComputationFailed(format!(
220-
"Error evaluating result of cost function {}: {e}",
221-
&cost_function_ref.function_name
220+
"Error evaluating result of cost function {cost_function_ref}: {e}",
222221
))
223222
})
224223
}

stackslib/src/clarity_vm/tests/costs.rs

+6-1
Original file line numberDiff line numberDiff line change
@@ -892,7 +892,12 @@ fn eval_cost_fn(
892892
.eval_read_only(&boot_costs_id, &exec)
893893
.map(|(value, _, _)| Some(value));
894894

895-
parse_cost(cost_fn_name, exec_result)
895+
let clarity_cost_fn_ref = ClarityCostFunctionReference {
896+
contract_id: boot_costs_id,
897+
function_name: cost_fn_name.to_string(),
898+
};
899+
900+
parse_cost(&clarity_cost_fn_ref.to_string(), exec_result)
896901
}
897902

898903
fn eval_replaced_cost_fn(

0 commit comments

Comments
 (0)