mirror of
https://github.com/darkrenaissance/darkfi.git
synced 2026-04-28 03:00:18 -04:00
poll() bug fix.
do not discard empty values on outgoing connections.
This commit is contained in:
@@ -204,9 +204,12 @@ async fn poll(client: Map, model: Arc<Model>) -> Result<()> {
|
||||
let msg = "Null".to_string();
|
||||
let status = "Null".to_string();
|
||||
let channel = Channel::new(msg, status);
|
||||
let new_slot =
|
||||
Slot::new(String::new(), channel, state.as_str().unwrap().to_string());
|
||||
slots.push(new_slot)
|
||||
let new_slot = Slot::new(
|
||||
String::from("Empty"),
|
||||
channel,
|
||||
state.as_str().unwrap().to_string(),
|
||||
);
|
||||
slots.push(new_slot.clone())
|
||||
} else {
|
||||
// channel is not empty. initialize with whole values
|
||||
let addr = &slot["addr"];
|
||||
@@ -219,10 +222,11 @@ async fn poll(client: Map, model: Arc<Model>) -> Result<()> {
|
||||
);
|
||||
slots.push(new_slot)
|
||||
}
|
||||
let oinfo = OutboundInfo::new(slots.clone());
|
||||
oconnects.push(oinfo);
|
||||
}
|
||||
let oinfo = OutboundInfo::new(slots);
|
||||
oconnects.push(oinfo);
|
||||
|
||||
debug!("OCONNECTS: {:?}", oconnects);
|
||||
let infos = NodeInfo { outbound: oconnects, manual: mconnects, inbound: iconnects };
|
||||
let mut node_info = HashMap::new();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user