mirror of
https://gitlab.com/veilid/veilid.git
synced 2025-02-25 18:55:38 -06:00
fix invalid nodeinfo check
This commit is contained in:
parent
ac6aa8f2eb
commit
99fb135b5b
@ -647,6 +647,11 @@ impl BucketEntryInner {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// If we have had any lost answers recently, this is not reliable
|
||||||
|
if self.peer_stats.rpc_stats.recent_lost_answers > 0 {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
match self.peer_stats.rpc_stats.first_consecutive_seen_ts {
|
match self.peer_stats.rpc_stats.first_consecutive_seen_ts {
|
||||||
// If we have not seen seen a node consecutively, it can't be reliable
|
// If we have not seen seen a node consecutively, it can't be reliable
|
||||||
None => false,
|
None => false,
|
||||||
|
@ -962,7 +962,10 @@ impl RoutingTableInner {
|
|||||||
None => has_valid_own_node_info,
|
None => has_valid_own_node_info,
|
||||||
Some(entry) => entry.with_inner(|e| {
|
Some(entry) => entry.with_inner(|e| {
|
||||||
e.signed_node_info(routing_domain)
|
e.signed_node_info(routing_domain)
|
||||||
.map(|sni| sni.has_any_signature())
|
.map(|sni| {
|
||||||
|
sni.has_any_signature()
|
||||||
|
&& !matches!(sni.node_info().network_class(), NetworkClass::Invalid)
|
||||||
|
})
|
||||||
.unwrap_or(false)
|
.unwrap_or(false)
|
||||||
}),
|
}),
|
||||||
}
|
}
|
||||||
|
@ -723,14 +723,14 @@ impl StorageManager {
|
|||||||
|
|
||||||
let dest = rpc_processor
|
let dest = rpc_processor
|
||||||
.resolve_target_to_destination(
|
.resolve_target_to_destination(
|
||||||
vc.target,
|
vc.target.clone(),
|
||||||
SafetySelection::Unsafe(Sequencing::NoPreference),
|
SafetySelection::Unsafe(Sequencing::NoPreference),
|
||||||
)
|
)
|
||||||
.await
|
.await
|
||||||
.map_err(VeilidAPIError::from)?;
|
.map_err(VeilidAPIError::from)?;
|
||||||
|
|
||||||
network_result_value_or_log!(rpc_processor
|
network_result_value_or_log!(rpc_processor
|
||||||
.rpc_call_value_changed(dest, vc.key, vc.subkeys, vc.count, (*vc.value).clone())
|
.rpc_call_value_changed(dest, vc.key, vc.subkeys.clone(), vc.count, (*vc.value).clone())
|
||||||
.await
|
.await
|
||||||
.map_err(VeilidAPIError::from)? => [format!(": dest={:?} vc={:?}", dest, vc)] {
|
.map_err(VeilidAPIError::from)? => [format!(": dest={:?} vc={:?}", dest, vc)] {
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user