Skip to content

Commit

Permalink
Fix test cases
Browse files Browse the repository at this point in the history
  • Loading branch information
boundless-forest committed Nov 2, 2023
1 parent 33b6c63 commit 03fbe8e
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 6 deletions.
1 change: 0 additions & 1 deletion frame/evm/src/runner/stack.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1045,7 +1045,6 @@ where
.create_contract_limit
.unwrap_or_default() as u64;
let (weight_info, recorded) = self.info_mut();
println!("bear: --- opcde: {:?}", opcode);

if let Some(weight_info) = weight_info {
// proof_size_limit is None indicates no need to record proof size, return directly.
Expand Down
2 changes: 1 addition & 1 deletion frame/evm/src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,7 @@ mod proof_size_test {
let reading_main_contract_len =
AccountCodes::<Test>::get(call_contract_address).len() as u64;
let expected_proof_size = reading_main_contract_len
+ ACCOUNT_STORAGE_PROOF_SIZE
+ ACCOUNT_STORAGE_PROOF_SIZE * 2
+ ACCOUNT_CODES_METADATA_PROOF_SIZE
+ IS_EMPTY_CHECK_PROOF_SIZE
+ (ACCOUNT_BASIC_PROOF_SIZE * 2);
Expand Down
4 changes: 0 additions & 4 deletions primitives/evm/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -135,10 +135,6 @@ impl WeightInfo {
(self.proof_size_usage, self.proof_size_limit)
{
let proof_size_usage = self.try_consume(cost, proof_size_limit, proof_size_usage)?;
println!(
"bear: --- record proof size: cost: {:?}, used_gas: {:?}",
cost, proof_size_usage
);
if proof_size_usage > proof_size_limit {
return Err(ExitError::OutOfGas);
}
Expand Down

0 comments on commit 03fbe8e

Please sign in to comment.