Add tests for defaulting to creating tlv onions
[rust-lightning] / lightning / src / routing / network_graph.rs
index 282c87051dd48f2c3b3a82db778cc20a78f7e2c5..39c2894b32c429b5115f4eee66c427bed21989b1 100644 (file)
@@ -1033,6 +1033,15 @@ impl NetworkGraph {
                }
        }
 
+       /// Clears the `NodeAnnouncementInfo` field for all nodes in the `NetworkGraph` for testing
+       /// purposes.
+       #[cfg(test)]
+       pub fn clear_nodes_announcement_info(&self) {
+               for node in self.nodes.write().unwrap().iter_mut() {
+                       node.1.announcement_info = None;
+               }
+       }
+
        /// For an already known node (from channel announcements), update its stored properties from a
        /// given node announcement.
        ///