node: Relax `routes_to` test function

We were being too strict by requiring that no routes existed that
weren't passed into the function. This isn't really useful for testing,
since we're more interested in checking that certain routes are there,
rather than testing that *only* those routes are there.
This commit is contained in:
cloudhead 2023-10-03 13:21:48 +02:00
parent 2011f2b06e
commit cd4c44986a
No known key found for this signature in database
1 changed files with 1 additions and 4 deletions

View File

@ -227,10 +227,7 @@ impl<G: Signer + cyphernet::Ecdh> NodeHandle<G> {
for (rid, nid) in self.routing() {
if !remaining.remove(&(rid, nid)) {
panic!(
"Node::routes_to: unexpected route for {}: ({rid}, {nid})",
self.id
);
log::debug!(target: "test", "Found unexpected route for {}: ({rid}, {nid})", self.id);
}
}
if remaining.is_empty() {