diff --git a/Cargo.lock b/Cargo.lock index 39c186f0b..aa8e9e609 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3767,15 +3767,10 @@ dependencies = [ "im", "infusion", "ink-quill", - "lightning-application", "lightning-interfaces", "lightning-metrics", - "lightning-notifier", - "lightning-signer", - "lightning-topology", "log", "mini-moka", - "mock", "rand 0.8.5", "serde", "smallvec", diff --git a/core/broadcast/Cargo.toml b/core/broadcast/Cargo.toml index 25949d686..8c80d2aee 100644 --- a/core/broadcast/Cargo.toml +++ b/core/broadcast/Cargo.toml @@ -28,10 +28,3 @@ smallvec = "1.11.0" ta = "0.5.0" log.workspace = true rand.workspace = true - -[dev-dependencies] -lightning-application = { path = "../application" } -lightning-signer = { path = "../signer" } -lightning-topology = { path = "../topology" } -lightning-notifier = { path = "../notifier" } -mock = { path = "../mock" } diff --git a/core/broadcast/src/ev.rs b/core/broadcast/src/ev.rs index 00490e0bb..7f28fdb29 100644 --- a/core/broadcast/src/ev.rs +++ b/core/broadcast/src/ev.rs @@ -175,13 +175,20 @@ impl Context { // This is a new digest which we have never seen before. At this point we immediately // wanna see the message and therefore we send out the want request. if new_digest { - // self.peers.send_want_request(&sender, advr.interned_id); + self.send( + sender, + Frame::Want(Want { + interned_id: advr.interned_id, + }), + ); self.pending_store.insert_request(sender, index); } // Remember the mapping since we may need it. - // self.peers - // .insert_index_mapping(&sender, index, advr.interned_id); + self.peers + .entry(sender) + .or_default() + .insert(index, advr.interned_id); // Handle the case for non-first advr. self.pending_store.insert_pending(sender, index); @@ -357,7 +364,7 @@ impl Context { peers .get(&id) .map(|mapping| !mapping.contains_key(&interned_id)) - .unwrap_or(false) + .unwrap_or(true) }); }