Skip to content
This repository has been archived by the owner on Jul 5, 2024. It is now read-only.

Commit

Permalink
clippy fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
miha-stopar committed Apr 19, 2024
1 parent 1dd4008 commit ab17509
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 9 deletions.
2 changes: 1 addition & 1 deletion bin/mpt-test/src/circuit/witness.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use std::{
time::Duration,
};

use ethers::core::utils;


use eth_types::{Field, ToScalar};

Expand Down
2 changes: 1 addition & 1 deletion zkevm-circuits/src/mpt_circuit/account_leaf.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use eth_types::{Field, OpsIdentity, U256};
use gadgets::util::{pow, xor, Scalar};
use gadgets::util::{pow, Scalar};
use halo2_proofs::{
circuit::Value,
plonk::{Error, Expression, VirtualCells},
Expand Down
13 changes: 6 additions & 7 deletions zkevm-circuits/src/mpt_circuit/helpers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -615,6 +615,7 @@ impl<F: Field> ParentData<F> {
parent_data
}

#[allow(clippy::too_many_arguments)]
pub(crate) fn store<MB: MemoryBank<F, MptCellType>>(
cb: &mut MPTConstraintBuilder<F>,
memory: &mut MB,
Expand Down Expand Up @@ -1454,14 +1455,12 @@ impl<F: Field> WrongExtNodeGadget<F> {
.0;

let mut mult = key_data.mult;
if !key_data.is_odd {
if key_data.num_nibbles > 1 {
let iters = (key_data.num_nibbles - 1 - 1) / 2; // -1 because of the branch nibble, -1 because of being odd
mult = F::one();
if !key_data.is_odd && key_data.num_nibbles > 1 {
let iters = (key_data.num_nibbles - 1 - 1) / 2; // -1 because of the branch nibble, -1 because of being odd
mult = F::one();

for _ in 0..iters {
mult = mult * region.key_r;
}
for _ in 0..iters {
mult *= region.key_r;
}
}
let _ = self.mult_without_branch_nibble.assign(region, offset, mult);
Expand Down

0 comments on commit ab17509

Please sign in to comment.