In create memory calculation is the same for create2 because the additional parameter was popped before. (#9522)
This commit is contained in:
parent
98220442b4
commit
65bf1086a2
@ -233,11 +233,7 @@ impl<Gas: evm::CostType> Gasometer<Gas> {
|
|||||||
},
|
},
|
||||||
instructions::CREATE | instructions::CREATE2 => {
|
instructions::CREATE | instructions::CREATE2 => {
|
||||||
let gas = Gas::from(schedule.create_gas);
|
let gas = Gas::from(schedule.create_gas);
|
||||||
let mem = match instruction {
|
let mem = mem_needed(stack.peek(1), stack.peek(2))?;
|
||||||
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"),
|
|
||||||
};
|
|
||||||
|
|
||||||
Request::GasMemProvide(gas, mem, None)
|
Request::GasMemProvide(gas, mem, None)
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user