binary for trace

This commit is contained in:
Nikolay Volf 2016-05-06 17:19:53 +04:00
parent 29531ae72f
commit c622fc62d5

View File

@ -20,9 +20,12 @@ use util::rlp::*;
use util::sha3::Hashable;
use action_params::ActionParams;
use basic_types::LogBloom;
use ipc::binary::BinaryConvertError;
use std::mem;
use std::collections::VecDeque;
/// `Call` result.
#[derive(Debug, Clone, PartialEq, Default)]
#[derive(Debug, Clone, PartialEq, Default, Binary)]
pub struct CallResult {
/// Gas used by call.
pub gas_used: U256,
@ -51,7 +54,7 @@ impl Decodable for CallResult {
}
/// `Create` result.
#[derive(Debug, Clone, PartialEq)]
#[derive(Debug, Clone, PartialEq, Binary)]
pub struct CreateResult {
/// Gas used by create.
pub gas_used: U256,
@ -84,7 +87,7 @@ impl Decodable for CreateResult {
}
/// Description of a _call_ action, either a `CALL` operation or a message transction.
#[derive(Debug, Clone, PartialEq)]
#[derive(Debug, Clone, PartialEq, Binary)]
pub struct Call {
/// The sending account.
pub from: Address,
@ -146,7 +149,7 @@ impl Call {
}
/// Description of a _create_ action, either a `CREATE` operation or a create transction.
#[derive(Debug, Clone, PartialEq)]
#[derive(Debug, Clone, PartialEq, Binary)]
pub struct Create {
/// The address of the creator.
pub from: Address,
@ -202,7 +205,7 @@ impl Create {
}
/// Description of an action that we trace; will be either a call or a create.
#[derive(Debug, Clone, PartialEq)]
#[derive(Debug, Clone, PartialEq, Binary)]
pub enum Action {
/// It's a call action.
Call(Call),
@ -249,7 +252,7 @@ impl Action {
}
/// The result of the performed action.
#[derive(Debug, Clone, PartialEq)]
#[derive(Debug, Clone, PartialEq, Binary)]
pub enum Res {
/// Successful call action result.
Call(CallResult),
@ -300,7 +303,7 @@ impl Decodable for Res {
}
}
#[derive(Debug, Clone, PartialEq)]
#[derive(Debug, Clone, PartialEq, Binary)]
/// A trace; includes a description of the action being traced and sub traces of each interior action.
pub struct Trace {
/// The number of EVM execution environments active when this action happened; 0 if it's