Initial handling of RPC HELLO requests

This commit is contained in:
Age Manning 2019-03-19 14:40:08 +11:00
parent 5ae8079b44
commit 752c784534
No known key found for this signature in database
GPG Key ID: 05EED64B79E06A93

View File

@ -129,7 +129,7 @@ impl MessageHandler {
fn handle_rpc_request(&mut self, peer_id: PeerId, id: u64, request: RPCRequest) { fn handle_rpc_request(&mut self, peer_id: PeerId, id: u64, request: RPCRequest) {
match request { match request {
RPCRequest::Hello(hello_message) => { RPCRequest::Hello(hello_message) => {
self.handle_hello_response(peer_id, id, hello_message) // self.handle_hello_request(peer_id, id, hello_message)
} }
} }
} }
@ -146,6 +146,7 @@ impl MessageHandler {
debug!(self.log, "Hello response received from peer: {:?}", peer_id); debug!(self.log, "Hello response received from peer: {:?}", peer_id);
// validate peer - decide whether to drop/ban or add to sync // validate peer - decide whether to drop/ban or add to sync
// TODO: Peer validation
} }
/// Sends a HELLO RPC request to a newly connected peer. /// Sends a HELLO RPC request to a newly connected peer.