Transaction tracing for eth_call.
This commit is contained in:
@@ -461,7 +461,7 @@ impl<V> BlockChainClient for Client<V> where V: Verifier {
|
||||
// give the sender a sufficient balance
|
||||
state.add_balance(&sender, &(needed_balance - balance));
|
||||
}
|
||||
let options = TransactOptions { tracing: false, vm_tracing: analytics.vm_tracing, check_nonce: false };
|
||||
let options = TransactOptions { tracing: analytics.transaction_tracing, vm_tracing: analytics.vm_tracing, check_nonce: false };
|
||||
let mut ret = Executive::new(&mut state, &env_info, self.engine.deref().deref(), &self.vm_factory).transact(t, options);
|
||||
// TODO gav move this into Executive.
|
||||
if analytics.state_diffing {
|
||||
|
||||
@@ -52,6 +52,8 @@ use error::Error as EthError;
|
||||
/// Options concerning what analytics we run on the call.
|
||||
#[derive(Eq, PartialEq, Default, Clone, Copy, Debug)]
|
||||
pub struct CallAnalytics {
|
||||
/// Make a transaction trace.
|
||||
pub transaction_tracing: bool,
|
||||
/// Make a VM trace.
|
||||
pub vm_tracing: bool,
|
||||
/// Make a diff.
|
||||
|
||||
@@ -276,7 +276,7 @@ impl MinerService for Miner {
|
||||
// give the sender max balance
|
||||
state.sub_balance(&sender, &balance);
|
||||
state.add_balance(&sender, &U256::max_value());
|
||||
let options = TransactOptions { tracing: false, vm_tracing: analytics.vm_tracing, check_nonce: false };
|
||||
let options = TransactOptions { tracing: analytics.transaction_tracing, vm_tracing: analytics.vm_tracing, check_nonce: false };
|
||||
|
||||
let mut ret = Executive::new(&mut state, &env_info, self.engine(), chain.vm_factory()).transact(t, options);
|
||||
// TODO gav move this into Executive.
|
||||
|
||||
Reference in New Issue
Block a user