refactor get_contact_method

This commit is contained in:
John Smith
2022-10-12 22:53:40 -04:00
parent a06c2fb5a3
commit 2d526674a5
8 changed files with 424 additions and 222 deletions
+4 -1
View File
@@ -6,7 +6,7 @@ use alloc::fmt;
// We should ping them with some frequency and 30 seconds is typical timeout
const CONNECTIONLESS_TIMEOUT_SECS: u32 = 29;
#[derive(Clone, Debug, PartialEq, Eq, PartialOrd, Ord)]
#[derive(Copy, Clone, Debug, PartialEq, Eq, PartialOrd, Ord)]
pub struct NodeRefFilter {
pub routing_domain_set: RoutingDomainSet,
pub dial_info_filter: DialInfoFilter,
@@ -131,6 +131,9 @@ impl NodeRef {
pub fn set_reliable(&mut self) {
self.reliable = true;
}
pub fn reliable(&self) -> bool {
self.reliable
}
pub fn merge_filter(&mut self, filter: NodeRefFilter) {
if let Some(self_filter) = self.filter.take() {