Skip to content

Commit dcbc7f4

Browse files
authored
Merge pull request #5865 from stacks-network/chore/error-text-costs
Chore: match the error strings in cost errors
2 parents bd45dd7 + dd97d6d commit dcbc7f4

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

clarity/src/vm/costs/mod.rs

Lines changed: 1 addition & 2 deletions
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

Lines changed: 6 additions & 1 deletion
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)