executive checks schedule exceptional code deposit before returning OutOfGas
This commit is contained in:
parent
f7af71e272
commit
1aa62691c6
@ -419,7 +419,10 @@ impl<'a> Ext for Externalities<'a> {
|
||||
&mut OutputPolicy::InitContract => {
|
||||
let return_cost = data.len() as u64 * self.schedule.create_data_gas as u64;
|
||||
if return_cost > gas {
|
||||
return Err(evm::Error::OutOfGas);
|
||||
match self.schedule.exceptional_failed_code_deposit {
|
||||
true => return Err(evm::Error::OutOfGas),
|
||||
false => return Ok(gas)
|
||||
}
|
||||
}
|
||||
let mut code = vec![];
|
||||
code.reserve(data.len());
|
||||
|
Loading…
Reference in New Issue
Block a user