Skip to content
This repository has been archived by the owner on Nov 6, 2020. It is now read-only.

Commit

Permalink
Improve Tracer documentation (#9237)
Browse files Browse the repository at this point in the history
  • Loading branch information
udoprog authored and debris committed Jul 30, 2018
1 parent 771ea47 commit f981438
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions ethcore/src/trace/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,15 +49,21 @@ pub trait Tracer: Send {
type Output;

/// Prepares call trace for given params. Noop tracer should return None.
///
/// This is called before a call has been executed.
fn prepare_trace_call(&self, params: &ActionParams) -> Option<Call>;

/// Prepares create trace for given params. Noop tracer should return None.
///
/// This is called before a create has been executed.
fn prepare_trace_create(&self, params: &ActionParams) -> Option<Create>;

/// Prepare trace output. Noop tracer should return None.
fn prepare_trace_output(&self) -> Option<Bytes>;

/// Stores trace call info.
///
/// This is called after a call has completed successfully.
fn trace_call(
&mut self,
call: Option<Call>,
Expand All @@ -67,6 +73,8 @@ pub trait Tracer: Send {
);

/// Stores trace create info.
///
/// This is called after a create has completed successfully.
fn trace_create(
&mut self,
create: Option<Create>,
Expand All @@ -77,9 +85,13 @@ pub trait Tracer: Send {
);

/// Stores failed call trace.
///
/// This is called after a call has completed erroneously.
fn trace_failed_call(&mut self, call: Option<Call>, subs: Vec<Self::Output>, error: TraceError);

/// Stores failed create trace.
///
/// This is called after a create has completed erroneously.
fn trace_failed_create(&mut self, create: Option<Create>, subs: Vec<Self::Output>, error: TraceError);

/// Stores suicide info.
Expand Down

0 comments on commit f981438

Please sign in to comment.