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

Commit

Permalink
Fix defaults for CallResult
Browse files Browse the repository at this point in the history
  • Loading branch information
sorpaas committed Apr 27, 2018
1 parent 12930bc commit 7d7d5bf
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion ethcore/src/trace/types/trace.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ use evm::CallType;
use super::error::Error;

/// `Call` result.
#[derive(Debug, Clone, PartialEq, Default)]
#[derive(Debug, Clone, PartialEq)]
pub struct CallResult {
/// Gas used by call.
pub gas_used: U256,
Expand Down Expand Up @@ -64,6 +64,15 @@ impl rlp::Decodable for CallResult {
}
}

impl Default for CallResult {
fn default() -> Self {
CallResult {
gas_used: Default::default(),
output: Some(Default::default()),
}
}
}

/// `Create` result.
#[derive(Debug, Clone, PartialEq, RlpEncodable, RlpDecodable)]
pub struct CreateResult {
Expand Down

0 comments on commit 7d7d5bf

Please sign in to comment.