pub struct TraceDB<T> where
T: DatabaseExtras, { /* private fields */ }
Expand description
Database to store transaction execution trace.
Whenever a transaction is executed by EVM it’s execution trace is stored in trace database. Each trace has information, which contracts have been touched, which have been created during the execution of transaction, and which calls failed.
Implementations
sourceimpl<T> TraceDB<T> where
T: DatabaseExtras,
impl<T> TraceDB<T> where
T: DatabaseExtras,
sourcepub fn new(config: Config, db: Arc<dyn BlockChainDB>, extras: Arc<T>) -> Self
pub fn new(config: Config, db: Arc<dyn BlockChainDB>, extras: Arc<T>) -> Self
Creates new instance of TraceDB
.
sourcepub fn collect_garbage(&self)
pub fn collect_garbage(&self)
Ticks our cache system and throws out any old data.
Trait Implementations
sourceimpl<T> Database for TraceDB<T> where
T: DatabaseExtras,
impl<T> Database for TraceDB<T> where
T: DatabaseExtras,
sourcefn import(&self, batch: &mut DBTransaction, request: ImportRequest)
fn import(&self, batch: &mut DBTransaction, request: ImportRequest)
Traces of import request’s enacted blocks are expected to be already in database or to be the currently inserted trace.
sourcefn tracing_enabled(&self) -> bool
fn tracing_enabled(&self) -> bool
Returns true if tracing is enabled. Otherwise false.
sourcefn trace(
&self,
block_number: BlockNumber,
tx_position: usize,
trace_position: Vec<usize>
) -> Option<LocalizedTrace>
fn trace(
&self,
block_number: BlockNumber,
tx_position: usize,
trace_position: Vec<usize>
) -> Option<LocalizedTrace>
Returns localized trace at given position.
sourcefn transaction_traces(
&self,
block_number: BlockNumber,
tx_position: usize
) -> Option<Vec<LocalizedTrace>>
fn transaction_traces(
&self,
block_number: BlockNumber,
tx_position: usize
) -> Option<Vec<LocalizedTrace>>
Returns localized traces created by a single transaction.
sourcefn block_traces(&self, block_number: BlockNumber) -> Option<Vec<LocalizedTrace>>
fn block_traces(&self, block_number: BlockNumber) -> Option<Vec<LocalizedTrace>>
Returns localized traces created in given block.
Auto Trait Implementations
impl<T> !RefUnwindSafe for TraceDB<T>
impl<T> Send for TraceDB<T> where
T: Send + Sync,
impl<T> Sync for TraceDB<T> where
T: Send + Sync,
impl<T> Unpin for TraceDB<T>
impl<T> !UnwindSafe for TraceDB<T>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more