Capture traces and write some tests.

This commit is contained in:
Tomasz Drwięga
2017-10-20 15:40:25 +02:00
parent 4ac406da6b
commit 2d222a5920
15 changed files with 267 additions and 93 deletions

View File

@@ -29,7 +29,7 @@ use std::fmt;
/// Transaction execution receipt.
#[derive(Debug, PartialEq, Clone)]
pub struct Executed {
pub struct Executed<T = FlatTrace, V = VMTrace> {
/// True if the outer call/create resulted in an exceptional exit.
pub exception: Option<vm::Error>,
@@ -63,9 +63,9 @@ pub struct Executed {
/// Transaction output.
pub output: Bytes,
/// The trace of this transaction.
pub trace: Vec<FlatTrace>,
pub trace: Vec<T>,
/// The VM trace of this transaction.
pub vm_trace: Option<VMTrace>,
pub vm_trace: Option<V>,
/// The state diff, if we traced it.
pub state_diff: Option<StateDiff>,
}