From dec538e8b5bfad519e5666328eeab6835df3d4f1 Mon Sep 17 00:00:00 2001 From: zeroXbrock <2791467+zeroXbrock@users.noreply.github.com> Date: Tue, 10 Dec 2024 18:10:22 -0800 Subject: [PATCH] remove redundant data in gas_limits map key --- crates/core/src/test_scenario.rs | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) diff --git a/crates/core/src/test_scenario.rs b/crates/core/src/test_scenario.rs index 851d675..7e43867 100644 --- a/crates/core/src/test_scenario.rs +++ b/crates/core/src/test_scenario.rs @@ -296,22 +296,7 @@ where .to_owned(); self.nonces.insert(from.to_owned(), nonce + 1); - let key = keccak256( - [ - tx_req - .input - .input - .to_owned() - .map(|b| b.split_at(4).0.to_owned()) - .ok_or(ContenderError::SetupError( - "invalid function call", - Some(format!("{:?}", tx_req.input.input)), - ))? - .as_slice(), - &tx_req.input.input.to_owned().unwrap_or_default(), - ] - .concat(), - ); + let key = keccak256(&tx_req.input.input.to_owned().unwrap_or_default()); if let std::collections::hash_map::Entry::Vacant(_) = self.gas_limits.entry(key) { let gas_limit = self