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

Commit 65bf108

Browse files
chemesorpaas
authored andcommitted
In create memory calculation is the same for create2 because the additional parameter was popped before. (#9522)
1 parent 9822044 commit 65bf108

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

ethcore/evm/src/interpreter/gasometer.rs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -233,11 +233,7 @@ impl<Gas: evm::CostType> Gasometer<Gas> {
233233
},
234234
instructions::CREATE | instructions::CREATE2 => {
235235
let gas = Gas::from(schedule.create_gas);
236-
let mem = match instruction {
237-
instructions::CREATE => mem_needed(stack.peek(1), stack.peek(2))?,
238-
instructions::CREATE2 => mem_needed(stack.peek(2), stack.peek(3))?,
239-
_ => unreachable!("instruction can only be CREATE/CREATE2 checked above; qed"),
240-
};
236+
let mem = mem_needed(stack.peek(1), stack.peek(2))?;
241237

242238
Request::GasMemProvide(gas, mem, None)
243239
},

0 commit comments

Comments
 (0)