Fixing warnings
This commit is contained in:
@@ -17,7 +17,6 @@
|
||||
///! Rust VM implementation
|
||||
|
||||
use common::*;
|
||||
use trace::VMTracer;
|
||||
use super::instructions as instructions;
|
||||
use super::instructions::{Instruction, get_info};
|
||||
use std::marker::Copy;
|
||||
|
||||
@@ -81,14 +81,14 @@ impl<'a> Executive<'a> {
|
||||
}
|
||||
|
||||
/// Creates `Externalities` from `Executive`.
|
||||
pub fn as_externalities<'_, T, V>(
|
||||
&'_ mut self,
|
||||
pub fn as_externalities<'any, T, V>(
|
||||
&'any mut self,
|
||||
origin_info: OriginInfo,
|
||||
substate: &'_ mut Substate,
|
||||
output: OutputPolicy<'_, '_>,
|
||||
tracer: &'_ mut T,
|
||||
vm_tracer: &'_ mut V
|
||||
) -> Externalities<'_, T, V> where T: Tracer, V: VMTracer {
|
||||
substate: &'any mut Substate,
|
||||
output: OutputPolicy<'any, 'any>,
|
||||
tracer: &'any mut T,
|
||||
vm_tracer: &'any mut V
|
||||
) -> Externalities<'any, T, V> where T: Tracer, V: VMTracer {
|
||||
Externalities::new(self.state, self.info, self.engine, self.vm_factory, self.depth, origin_info, substate, output, tracer, vm_tracer)
|
||||
}
|
||||
|
||||
|
||||
@@ -117,7 +117,7 @@ impl VMTracer for ExecutiveVMTracer {
|
||||
self.data.operations.push(VMOperation {
|
||||
pc: pc,
|
||||
instruction: instruction,
|
||||
gas_cost: gas_cost.clone(),
|
||||
gas_cost: gas_cost.clone(),
|
||||
executed: None,
|
||||
});
|
||||
true
|
||||
@@ -133,10 +133,10 @@ impl VMTracer for ExecutiveVMTracer {
|
||||
self.data.operations.last_mut().expect("trace_executed is always called after a trace_prepare_execute").executed = Some(ex);
|
||||
}
|
||||
|
||||
fn prepare_subtrace(&self, code: &Bytes) -> Self {
|
||||
fn prepare_subtrace(&self, code: &[u8]) -> Self {
|
||||
ExecutiveVMTracer { data: VMTrace {
|
||||
parent_step: self.data.operations.len(),
|
||||
code: code.clone(),
|
||||
code: code.to_vec(),
|
||||
operations: vec![],
|
||||
subs: vec![],
|
||||
}}
|
||||
|
||||
@@ -98,7 +98,7 @@ pub trait VMTracer: Send {
|
||||
fn trace_executed(&mut self, _gas_used: U256, _stack_push: &[U256], _mem_diff: Option<(usize, &[u8])>, _store_diff: Option<(U256, U256)>) {}
|
||||
|
||||
/// Spawn subtracer which will be used to trace deeper levels of execution.
|
||||
fn prepare_subtrace(&self, code: &Bytes) -> Self where Self: Sized;
|
||||
fn prepare_subtrace(&self, code: &[u8]) -> Self where Self: Sized;
|
||||
|
||||
/// Spawn subtracer which will be used to trace deeper levels of execution.
|
||||
fn done_subtrace(&mut self, sub: Self) where Self: Sized;
|
||||
|
||||
@@ -75,7 +75,7 @@ impl VMTracer for NoopVMTracer {
|
||||
fn trace_executed(&mut self, _gas_used: U256, _stack_push: &[U256], _mem_diff: Option<(usize, &[u8])>, _store_diff: Option<(U256, U256)>) {}
|
||||
|
||||
/// Spawn subtracer which will be used to trace deeper levels of execution.
|
||||
fn prepare_subtrace(&self, _code: &Bytes) -> Self { NoopVMTracer }
|
||||
fn prepare_subtrace(&self, _code: &[u8]) -> Self { NoopVMTracer }
|
||||
|
||||
/// Spawn subtracer which will be used to trace deeper levels of execution.
|
||||
fn done_subtrace(&mut self, _sub: Self) {}
|
||||
|
||||
Reference in New Issue
Block a user