rpc sender dialinfo
This commit is contained in:
@@ -35,9 +35,9 @@ impl NodeRef {
|
||||
self.node_id
|
||||
}
|
||||
|
||||
// pub fn dial_info_filter(&self) -> DialInfoFilter {
|
||||
// self.dial_info_filter.clone()
|
||||
// }
|
||||
pub fn dial_info_filter(&self) -> &DialInfoFilter {
|
||||
&self.dial_info_filter
|
||||
}
|
||||
|
||||
pub fn operate<T, F>(&self, f: F) -> T
|
||||
where
|
||||
@@ -46,6 +46,16 @@ impl NodeRef {
|
||||
self.routing_table.operate_on_bucket_entry(self.node_id, f)
|
||||
}
|
||||
|
||||
// Returns if this node has seen and acknowledged our node's dial info yet
|
||||
pub fn has_seen_our_dial_info(&self) -> bool {
|
||||
let nm = self.routing_table.network_manager();
|
||||
self.operate(|e| e.has_seen_our_dial_info())
|
||||
}
|
||||
pub fn set_seen_our_dial_info(&self) {
|
||||
let nm = self.routing_table.network_manager();
|
||||
self.operate(|e| e.set_seen_our_dial_info(true));
|
||||
}
|
||||
|
||||
// Returns the best dial info to attempt a connection to this node
|
||||
pub fn best_dial_info(&self) -> Option<DialInfo> {
|
||||
let nm = self.routing_table.network_manager();
|
||||
|
||||
Reference in New Issue
Block a user