just to make sure we don't screw up this again (#11455)

This commit is contained in:
Andronik Ordian 2020-02-05 16:18:28 +01:00 committed by GitHub
parent 626543326d
commit e20d5b639e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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 {