Implement encodeable on all RPC methods

This commit is contained in:
Age Manning 2019-03-21 11:25:22 +11:00
parent 950186eca7
commit 437a0505c9
No known key found for this signature in database
GPG Key ID: 05EED64B79E06A93

View File

@ -178,7 +178,21 @@ impl Encodable for RPCEvent {
RPCRequest::Hello(body) => { RPCRequest::Hello(body) => {
s.append(body); s.append(body);
} }
_ => {} RPCRequest::Goodbye(body) => {
s.append(body);
}
RPCRequest::BeaconBlockRoots(body) => {
s.append(body);
}
RPCRequest::BeaconBlockHeaders(body) => {
s.append(body);
}
RPCRequest::BeaconBlockBodies(body) => {
s.append(body);
}
RPCRequest::BeaconChainState(body) => {
s.append(body);
}
} }
} }
RPCEvent::Response { RPCEvent::Response {
@ -193,7 +207,18 @@ impl Encodable for RPCEvent {
RPCResponse::Hello(response) => { RPCResponse::Hello(response) => {
s.append(response); s.append(response);
} }
_ => {} RPCResponse::BeaconBlockRoots(response) => {
s.append(response);
}
RPCResponse::BeaconBlockHeaders(response) => {
s.append(response);
}
RPCResponse::BeaconBlockBodies(response) => {
s.append(response);
}
RPCResponse::BeaconChainState(response) => {
s.append(response);
}
} }
} }
} }