Fixes for marek's shooting from the hip.
This commit is contained in:
parent
3c2c9771ec
commit
08b58da107
@ -294,16 +294,14 @@ impl<'a> Executive<'a> {
|
|||||||
|
|
||||||
fn revert_if_needed(&mut self, result: &evm::Result, substate: &mut Substate, backup: State) {
|
fn revert_if_needed(&mut self, result: &evm::Result, substate: &mut Substate, backup: State) {
|
||||||
// TODO: handle other evm::Errors same as OutOfGas once they are implemented
|
// TODO: handle other evm::Errors same as OutOfGas once they are implemented
|
||||||
match &result {
|
match result {
|
||||||
&Err(evm::Error::OutOfGas) => {
|
&Err(evm::Error::OutOfGas) => {
|
||||||
substate.out_of_gas = true;
|
substate.out_of_gas = true;
|
||||||
self.state.revert(backup);
|
self.state.revert(backup);
|
||||||
},
|
},
|
||||||
&Err(evm::Error::Internal) => (),
|
&Err(evm::Error::Internal) => (),
|
||||||
&Ok(_) => ()
|
&Ok(_) => ()
|
||||||
|
|
||||||
}
|
}
|
||||||
result
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user