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

Commit

Permalink
just to make sure we don't screw up this again (#11455)
Browse files Browse the repository at this point in the history
  • Loading branch information
ordian authored Feb 5, 2020
1 parent 6265433 commit e20d5b6
Showing 1 changed file with 0 additions and 24 deletions.
24 changes: 0 additions & 24 deletions ethcore/trace/src/types/trace.rs
Original file line number Diff line number Diff line change
Expand Up @@ -67,30 +67,6 @@ impl TryFrom<ActionType> for CallType {
}
}

impl Encodable for CallType {
fn rlp_append(&self, s: &mut RlpStream) {
let v = match *self {
CallType::Call => 0u32,
CallType::CallCode => 1,
CallType::DelegateCall => 2,
CallType::StaticCall => 3,
};
Encodable::rlp_append(&v, s);
}
}

impl Decodable for CallType {
fn decode(rlp: &Rlp) -> Result<Self, DecoderError> {
rlp.as_val().and_then(|v| Ok(match v {
1u32 => CallType::Call,
2 => CallType::CallCode,
3 => CallType::DelegateCall,
4 => CallType::StaticCall,
_ => return Err(DecoderError::Custom("Invalid value of CallType item")),
}))
}
}

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

0 comments on commit e20d5b6

Please sign in to comment.