diff --git a/.github/workflows/scheduled_lints.yml b/.github/workflows/scheduled_lints.yml index 690165215..52918b251 100644 --- a/.github/workflows/scheduled_lints.yml +++ b/.github/workflows/scheduled_lints.yml @@ -17,8 +17,9 @@ jobs: toolchain: nightly override: true components: clippy + - run: make etc/eth-contracts/res/EvmErc20.bin - name: Run cargo clippy uses: actions-rs/cargo@v1 with: command: clippy - args: --no-default-features --features=contract -- -D warnings + args: --no-default-features --features=mainnet -- -D warnings diff --git a/src/precompiles/modexp.rs b/src/precompiles/modexp.rs index c1be8dbc8..0b56a38ba 100644 --- a/src/precompiles/modexp.rs +++ b/src/precompiles/modexp.rs @@ -94,7 +94,7 @@ impl Precompile for ModExp { let (base_len, exp_len, mod_len) = parse_lengths(input); let mul = Self::mul_complexity(core::cmp::max(mod_len, base_len)); - let iter_count = Self::calc_iter_count(exp_len, base_len, &input); + let iter_count = Self::calc_iter_count(exp_len, base_len, input); // mul * iter_count bounded by 2^195 < 2^256 (no overflow) let gas = mul * core::cmp::max(iter_count, U256::one()) / U256::from(20); @@ -134,7 +134,7 @@ impl Precompile for ModExp { let (base_len, exp_len, mod_len) = parse_lengths(input); let mul = Self::mul_complexity(base_len, mod_len); - let iter_count = Self::calc_iter_count(exp_len, base_len, &input); + let iter_count = Self::calc_iter_count(exp_len, base_len, input); // mul * iter_count bounded by 2^189 (so no overflow) let gas = mul * iter_count / U256::from(3);