From c622fc62d5481830c2a7a0d6e126ca6efdf54c64 Mon Sep 17 00:00:00 2001 From: Nikolay Volf Date: Fri, 6 May 2016 17:19:53 +0400 Subject: [PATCH] binary for trace --- ethcore/src/types/trace_types/trace.rs | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/ethcore/src/types/trace_types/trace.rs b/ethcore/src/types/trace_types/trace.rs index f7efe9721..9eb6ef5ac 100644 --- a/ethcore/src/types/trace_types/trace.rs +++ b/ethcore/src/types/trace_types/trace.rs @@ -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