Implement Goodbye and BeaconState msg handlers

This commit is contained in:
Paul Hauner
2019-03-24 17:51:32 +11:00
parent f918f42b28
commit 796b68dc04
4 changed files with 79 additions and 9 deletions

View File

@@ -82,8 +82,8 @@ fn decode(packet: Vec<u8>) -> Result<RPCEvent, DecodeError> {
RPCRequest::Hello(hello_body)
}
RPCMethod::Goodbye => {
let (goodbye_code, _index) = u64::ssz_decode(&packet, index)?;
RPCRequest::Goodbye(goodbye_code)
let (goodbye_reason, _index) = GoodbyeReason::ssz_decode(&packet, index)?;
RPCRequest::Goodbye(goodbye_reason)
}
RPCMethod::BeaconBlockRoots => {
let (block_roots_request, _index) =