Remove exposed unimplemented!() in the Kad server (#298)

This commit is contained in:
Pierre Krieger 2018-07-14 13:58:16 +02:00 committed by GitHub
parent 4592d1b21e
commit 7c71ffddb2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 3 deletions

View File

@ -383,10 +383,16 @@ where
Box::new(future)
}
Some(EventSource::Remote(KadMsg::GetValueReq { .. })) => {
unimplemented!() // FIXME:
warn!("GET_VALUE requests are not implemented yet");
let future = future::err(IoError::new(IoErrorKind::Other,
"GET_VALUE requests are not implemented yet"));
return Box::new(future);
}
Some(EventSource::Remote(KadMsg::PutValue { .. })) => {
unimplemented!() // FIXME:
warn!("PUT_VALUE requests are not implemented yet");
let state = (events, kad_sink, responders_tx, send_back_queue, expected_pongs, finished);
let future = future::ok((None, state));
return Box::new(future);
}
}
}))

View File

@ -227,7 +227,7 @@ fn msg_to_proto(kad_msg: KadMsg) -> protobuf_structs::dht::Message {
msg.set_clusterLevelRaw(10);
msg
}
KadMsg::GetValueRes { .. } => unimplemented!(),
KadMsg::GetValueRes { .. } => unimplemented!(), // TODO:
KadMsg::FindNodeReq { key } => {
let mut msg = protobuf_structs::dht::Message::new();
msg.set_field_type(protobuf_structs::dht::Message_MessageType::FIND_NODE);