node/test: Bind to loopback interface

This commit is contained in:
Lorenz Leutgeb 2026-02-14 00:53:55 +01:00 committed by Fintan Halpenny
parent dfe3b501c7
commit 730d696d74
1 changed files with 2 additions and 1 deletions

View File

@ -1,6 +1,7 @@
use std::fmt::Debug;
use std::io::BufRead as _;
use std::mem::ManuallyDrop;
use std::net::Ipv4Addr;
use std::path::Path;
use std::{
collections::{BTreeMap, BTreeSet},
@ -460,7 +461,7 @@ impl<G: cyphernet::Ecdh<Pk = NodeId> + Signer<Signature> + Clone + Debug> Node<G
/// Spawn a node in its own thread.
pub fn spawn(self) -> NodeHandle<G> {
let alias = self.config.alias.clone();
let listen = vec![([0, 0, 0, 0], 0).into()];
let listen = vec![(Ipv4Addr::LOCALHOST, 0).into()];
let (_, signals) = chan::bounded(1);
let rt = Runtime::init(
self.home.clone(),