Skip to content

Commit

Permalink
Merge pull request #2573 from ProvableHQ/fix/stack-compilation
Browse files Browse the repository at this point in the history
[Cleanup] Minor compilation and clippy fix
  • Loading branch information
zosorock authored Nov 13, 2024
2 parents 79402b5 + 3b8766a commit 0b391d2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions ledger/block/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -707,7 +707,7 @@ pub mod test_helpers {
(block, transaction, private_key)
}

pub(crate) fn sample_metadata(rng: &mut TestRng) -> Metadata<CurrentNetwork> {
pub(crate) fn sample_metadata() -> Metadata<CurrentNetwork> {
let network = CurrentNetwork::ID;
let round = u64::MAX;
let height = u32::MAX;
Expand All @@ -719,7 +719,7 @@ pub mod test_helpers {
let timestamp = i64::MAX - 1;
let last_coinbase_timestamp = timestamp - 1;
Metadata::new(
CurrentNetwork::ID,
network,
round,
height,
cumulative_weight,
Expand Down Expand Up @@ -881,9 +881,9 @@ mod tests {

#[test]
fn test_serde_metadata() {
let rng = &mut TestRng::default();
let metadata = crate::test_helpers::sample_metadata(rng);
let metadata = crate::test_helpers::sample_metadata();
let json_metadata = serde_json::to_string(&metadata).unwrap();
let deserialized_metadata: Metadata<CurrentNetwork> = serde_json::from_str(&json_metadata).unwrap();
assert_eq!(metadata, deserialized_metadata);
}
}
2 changes: 1 addition & 1 deletion synthesizer/process/src/cost.rs
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ pub fn execution_cost_v1<N: Network>(process: &Process<N>, execution: &Execution

// Get the finalize cost for the root transition.
let stack = process.get_stack(transition.program_id())?;
let finalize_cost = cost_in_microcredits_v1(stack, transition.function_name())?;
let finalize_cost = cost_in_microcredits_v1(&stack, transition.function_name())?;

// Compute the total cost in microcredits.
let total_cost = storage_cost
Expand Down

0 comments on commit 0b391d2

Please sign in to comment.