[Trace] Distinguish between create and create2 (#11311)

* adding a CreateType to ActionParams

* rename calltype to action type

* comments & line lengths

* rebame ActionParams.call_type

* Making call/create type optional

* Moving strict create/call type into trace package instead of storing loosely typed action type

* fix build

* Deriving ActionType from address_scheme in ext.create

* trigger build

* more detailed comments

* Change actions_type to call in vmtests

* skipping serialization for Option::None and using TryFrom instead of maybe_new

* retrigger build

* trigger build
This commit is contained in:
Felix Leupold
2020-01-13 11:10:24 +01:00
committed by Andronik Ordian
parent e95bbe36cb
commit 87e1080581
23 changed files with 290 additions and 148 deletions

View File

@@ -18,7 +18,7 @@
use std::sync::Arc;
use hash::keccak;
use vm::{EnvInfo, ActionParams, ActionValue, CallType, ParamsType};
use vm::{EnvInfo, ActionParams, ActionValue, ActionType, ParamsType};
use evm::Factory;
use machine::{
executive::Executive,
@@ -62,7 +62,7 @@ fn test_blockhash_eip210(factory: Factory) {
code_hash: Some(blockhash_contract_code_hash),
code_version: 0.into(),
data: Some(H256::from_low_u64_be(i - 1).as_bytes().to_vec()),
call_type: CallType::Call,
action_type: ActionType::Call,
params_type: ParamsType::Separate,
};
let schedule = machine.schedule(env_info.number);
@@ -86,7 +86,7 @@ fn test_blockhash_eip210(factory: Factory) {
code_hash: Some(get_prev_hash_code_hash),
code_version: 0.into(),
data: None,
call_type: CallType::Call,
action_type: ActionType::Call,
params_type: ParamsType::Separate,
};
let schedule = machine.schedule(env_info.number);