Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
asiniscalchi committed Aug 13, 2024
1 parent 87ca492 commit 38e8609
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions runtime/laos/src/configs/evm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ mod tests {
);
assert_eq!(
call_result.actual_weight.unwrap(),
Weight::from_parts(1035286000, 11597)
Weight::from_parts(1033661000, 11580)
);

// check gas
Expand All @@ -194,18 +194,18 @@ mod tests {
<Runtime as pallet_evm::Config>::GasWeightMapping::weight_to_gas(
call_result.actual_weight.unwrap()
),
41411
41346
);

// check weights from benchmarking
let weights_from_benchmarking =
weights::pallet_laos_evolution::WeightInfo::<Runtime>::precompile_create_collection();
assert_eq!(weights_from_benchmarking, Weight::from_parts(623907000, 3_873));
assert_eq!(weights_from_benchmarking, Weight::from_parts(622277000, 3_873));
assert_eq!(
<Runtime as pallet_evm::Config>::GasWeightMapping::weight_to_gas(
weights_from_benchmarking
),
24956
24891
);
});
}
Expand Down Expand Up @@ -256,7 +256,7 @@ mod tests {
wrong_address_call_result.actual_weight.unwrap(),
Weight::from_parts(402_186_000, 5_266)
);
assert_eq!(call_result.actual_weight.unwrap(), Weight::from_parts(432311000, 5567));
assert_eq!(call_result.actual_weight.unwrap(), Weight::from_parts(432011000, 5564));

// check gas
assert_eq!(
Expand All @@ -269,18 +269,18 @@ mod tests {
<Runtime as pallet_evm::Config>::GasWeightMapping::weight_to_gas(
call_result.actual_weight.unwrap()
),
17292
17280
);

// check weights from benchmarking
let weights_from_benchmarking =
weights::pallet_laos_evolution::WeightInfo::<Runtime>::precompile_owner();
assert_eq!(weights_from_benchmarking, Weight::from_parts(29934000, 3_509));
assert_eq!(weights_from_benchmarking, Weight::from_parts(29655000, 3_509));
assert_eq!(
<Runtime as pallet_evm::Config>::GasWeightMapping::weight_to_gas(
weights_from_benchmarking
),
1197
1186
);
});
}
Expand Down

0 comments on commit 38e8609

Please sign in to comment.