Implement Goodbye RPC call

This commit is contained in:
Age Manning 2019-03-21 10:53:29 +11:00
parent 3aa2b376bb
commit a14426349a
No known key found for this signature in database
GPG Key ID: 05EED64B79E06A93

View File

@ -81,6 +81,10 @@ fn decode(packet: Vec<u8>) -> Result<RPCEvent, DecodeError> {
let (hello_body, _index) = HelloMessage::ssz_decode(&packet, index)?;
RPCRequest::Hello(hello_body)
}
RPCMethod::Goodbye => {
let (goodbye_code, _index) = u64::ssz_decode(&packet, index)?;
RPCRequest::Goodbye(goodbye_code)
}
RPCMethod::Unknown | _ => return Err(DecodeError::UnknownRPCMethod),
};