allow revert to invalid nodeinfo
This commit is contained in:
@@ -169,24 +169,11 @@ impl RoutingTable {
|
||||
_last_ts: Timestamp,
|
||||
cur_ts: Timestamp,
|
||||
) -> EyreResult<()> {
|
||||
// Get our node's current node info and network class and do the right thing
|
||||
let network_class = self
|
||||
.get_network_class(RoutingDomain::PublicInternet)
|
||||
.unwrap_or(NetworkClass::Invalid);
|
||||
|
||||
// If we don't know our network class then don't do this yet
|
||||
if network_class == NetworkClass::Invalid {
|
||||
if !self.has_valid_network_class(RoutingDomain::PublicInternet) {
|
||||
return Ok(());
|
||||
}
|
||||
|
||||
// If we don't have our own peer info then don't do this yet
|
||||
if self
|
||||
.get_own_peer_info(RoutingDomain::PublicInternet)
|
||||
.is_none()
|
||||
{
|
||||
return Ok(());
|
||||
};
|
||||
|
||||
// Test locally allocated routes first
|
||||
// This may remove dead routes
|
||||
let routes_needing_testing = self.get_allocated_routes_to_test(cur_ts);
|
||||
|
@@ -10,9 +10,10 @@ impl RoutingTable {
|
||||
cur_ts: Timestamp,
|
||||
) -> EyreResult<()> {
|
||||
// Get our node's current node info and network class and do the right thing
|
||||
let Some(own_peer_info) = self.get_own_peer_info(RoutingDomain::PublicInternet) else {
|
||||
if !self.has_valid_network_class(RoutingDomain::PublicInternet) {
|
||||
return Ok(());
|
||||
};
|
||||
}
|
||||
let own_peer_info = self.get_own_peer_info(RoutingDomain::PublicInternet);
|
||||
let own_node_info = own_peer_info.signed_node_info().node_info();
|
||||
let network_class = own_node_info.network_class();
|
||||
let relay_node_filter = self.make_public_internet_relay_node_filter();
|
||||
|
Reference in New Issue
Block a user