Skip to content

Commit

Permalink
Update client.rs
Browse files Browse the repository at this point in the history
  • Loading branch information
shamardy authored Jun 27, 2018
1 parent cf0b4dd commit 8416df6
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions ethcore/src/client/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1227,7 +1227,6 @@ impl Client {
env_info: &EnvInfo,
machine: &::machine::EthereumMachine,
state_diff: bool,
hash_trace: bool,
transaction: &SignedTransaction,
options: TransactOptions<T, V>,
) -> Result<Executed<T::Output, V::Output>, CallError> where
Expand All @@ -1241,8 +1240,6 @@ impl Client {

let mut ret = Executive::new(state, env_info, machine).transact_virtual(transaction, options)?;

ret.transaction_hash = if hash_trace { Some(transaction.hash()) } else { None };

if let Some(original) = original_state {
ret.state_diff = Some(state.diff_from(original).map_err(ExecutionError::from)?);
}
Expand All @@ -1251,13 +1248,11 @@ impl Client {

let state_diff = analytics.state_diffing;

let hash_trace = analytics.hash_tracing;

match (analytics.transaction_tracing, analytics.vm_tracing) {
(true, true) => call(state, env_info, machine, state_diff, hash_trace, t, TransactOptions::with_tracing_and_vm_tracing()),
(true, false) => call(state, env_info, machine, state_diff, hash_trace, t, TransactOptions::with_tracing()),
(false, true) => call(state, env_info, machine, state_diff, hash_trace, t, TransactOptions::with_vm_tracing()),
(false, false) => call(state, env_info, machine, state_diff, hash_trace, t, TransactOptions::with_no_tracing()),
(true, true) => call(state, env_info, machine, state_diff, t, TransactOptions::with_tracing_and_vm_tracing()),
(true, false) => call(state, env_info, machine, state_diff, t, TransactOptions::with_tracing()),
(false, true) => call(state, env_info, machine, state_diff, t, TransactOptions::with_vm_tracing()),
(false, false) => call(state, env_info, machine, state_diff, t, TransactOptions::with_no_tracing()),
}
}

Expand Down

0 comments on commit 8416df6

Please sign in to comment.