Fixes for marek's shooting from the hip.

This commit is contained in:
Gav Wood 2016-01-15 00:09:56 +01:00
parent 3c2c9771ec
commit 08b58da107

View File

@ -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
} }
} }