Add some TODOs

This commit is contained in:
Daniel Karzel 2021-07-01 17:55:35 +10:00
parent d051e0f15b
commit dd933fc78b
No known key found for this signature in database
GPG Key ID: 30C3FC2E438ADB6E
2 changed files with 11 additions and 1 deletions

View File

@ -304,6 +304,8 @@ pub fn query_user_for_initial_config(testnet: bool) -> Result<Config> {
}
let ask_spread = Decimal::from_f64(ask_spread).context("Unable to parse spread")?;
// TODO: This is not complete given that the rendezvous section is optional - we
// could go for yes/no here first?
let rendezvous_peer_id_str = Input::with_theme(&ColorfulTheme::default())
.with_prompt("Enter the peer id of the rendezvous node you wish to register with")
.default(DEFAULT_RENDEZVOUS_PEER_ID.to_string())

View File

@ -54,10 +54,18 @@ impl Behaviour {
.expect("our namespace to be a correct string"),
self.rendezvous_point_peer_id,
None,
)?;
);
}
}
} else {
// TODO: The refresh has to be tied to a refersh time that is tied to us having
// gotten a Ttl! We should not be able to refresh like this,
// because it may result in constant retry (with new connections) if there is an
// error on the rendezvous side and the connection is closed.
// In such an error scenario the initial dial to the rendezvous node should
// just fail and then we get an error on the ASB and don't try again. (pointless
// to try again anyway if the rendezvous server is broken / not available)
let p2p_suffix = Protocol::P2p(self.rendezvous_point_peer_id.into());
let address_with_p2p = if !self
.rendezvous_point_addr