Refactor static context check in CREATE. (#6886)

* Refactor static context check in CREATE.

* Fix wasm.
This commit is contained in:
Tomasz Drwięga
2017-10-25 11:27:18 +02:00
committed by Arkadiy Paronyan
parent b50ed887c7
commit 8dfdebc2a2
6 changed files with 38 additions and 24 deletions

View File

@@ -35,9 +35,6 @@ pub enum ContractCreateResult {
/// Returned when contract creation failed.
/// VM doesn't have to know the reason.
Failed,
/// Returned when contract creation failed.
/// VM doesn't have to know the reason.
FailedInStaticCall,
/// Reverted with REVERT.
Reverted(U256, ReturnData),
}

View File

@@ -65,6 +65,7 @@ pub struct FakeExt {
pub schedule: Schedule,
pub balances: HashMap<Address, U256>,
pub tracing: bool,
pub is_static: bool,
}
// similar to the normal `finalize` function, but ignoring NeedsReturn.
@@ -192,7 +193,7 @@ impl Ext for FakeExt {
}
fn is_static(&self) -> bool {
false
self.is_static
}
fn inc_sstore_clears(&mut self) {