Skip to content
This repository has been archived by the owner on Nov 6, 2020. It is now read-only.

Commit

Permalink
In create memory calculation is the same for create2 because the addi…
Browse files Browse the repository at this point in the history
…tional parameter was popped before. (#9522)
  • Loading branch information
cheme authored and andresilva committed Oct 10, 2018
1 parent 6e30af2 commit 05f5e48
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions ethcore/evm/src/interpreter/gasometer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -233,11 +233,7 @@ impl<Gas: evm::CostType> Gasometer<Gas> {
},
instructions::CREATE | instructions::CREATE2 => {
let gas = Gas::from(schedule.create_gas);
let mem = match instruction {
instructions::CREATE => mem_needed(stack.peek(1), stack.peek(2))?,
instructions::CREATE2 => mem_needed(stack.peek(2), stack.peek(3))?,
_ => unreachable!("instruction can only be CREATE/CREATE2 checked above; qed"),
};
let mem = mem_needed(stack.peek(1), stack.peek(2))?;

Request::GasMemProvide(gas, mem, None)
},
Expand Down

0 comments on commit 05f5e48

Please sign in to comment.