revert_if_needed -> enact_result
This commit is contained in:
parent
821b3b3b75
commit
7f8adadd6b
@ -220,7 +220,7 @@ impl<'a> Executive<'a> {
|
|||||||
let evm = Factory::create();
|
let evm = Factory::create();
|
||||||
evm.exec(¶ms, &mut ext)
|
evm.exec(¶ms, &mut ext)
|
||||||
};
|
};
|
||||||
self.revert_if_needed(&res, substate, unconfirmed_substate, backup);
|
self.enact_result(&res, substate, unconfirmed_substate, backup);
|
||||||
res
|
res
|
||||||
} else {
|
} else {
|
||||||
// otherwise, nothing
|
// otherwise, nothing
|
||||||
@ -249,7 +249,7 @@ impl<'a> Executive<'a> {
|
|||||||
let evm = Factory::create();
|
let evm = Factory::create();
|
||||||
evm.exec(¶ms, &mut ext)
|
evm.exec(¶ms, &mut ext)
|
||||||
};
|
};
|
||||||
self.revert_if_needed(&res, substate, unconfirmed_substate, backup);
|
self.enact_result(&res, substate, unconfirmed_substate, backup);
|
||||||
res
|
res
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -306,7 +306,7 @@ impl<'a> Executive<'a> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn revert_if_needed(&mut self, result: &evm::Result, substate: &mut Substate, un_substate: Substate, backup: State) {
|
fn enact_result(&mut self, result: &evm::Result, substate: &mut Substate, un_substate: 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) => {
|
||||||
|
Loading…
Reference in New Issue
Block a user