Skip to content

Commit

Permalink
remove redundant data in gas_limits map key
Browse files Browse the repository at this point in the history
  • Loading branch information
zeroXbrock committed Dec 11, 2024
1 parent a720f76 commit dec538e
Showing 1 changed file with 1 addition and 16 deletions.
17 changes: 1 addition & 16 deletions crates/core/src/test_scenario.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit dec538e

Please sign in to comment.