From 68f88f13b44c7bb53cab79e70bb6bb93de9f34fe Mon Sep 17 00:00:00 2001 From: E M <5089238+emizzle@users.noreply.github.com> Date: Wed, 10 Dec 2025 22:10:32 +1100 Subject: [PATCH] fix: node bootstrap for successful two node network test Fix the two node network test by bootstrapping node2 to node1 on startup. --- tests/two_node_network.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/two_node_network.rs b/tests/two_node_network.rs index b09bcab..9f53e3c 100644 --- a/tests/two_node_network.rs +++ b/tests/two_node_network.rs @@ -59,10 +59,12 @@ async fn test_two_node_network() -> Result<(), Box> { let node1_peer_id = node1.peer_id()?; let node1_repo = node1.repo()?; + let debug1 = codex_bindings::debug(&node1).await?; println!("Node 1 started:"); println!(" Peer ID: {}", node1_peer_id); println!(" Repository: {}", node1_repo); + println!(" SPR: {}", debug1.spr); // Configure node2 with different ports and bootstrap to node1 println!("\n=== Creating Node 2 ==="); @@ -71,7 +73,8 @@ async fn test_two_node_network() -> Result<(), Box> { .data_dir(&node2_dir) .storage_quota(100 * 1024 * 1024) // 100 MB .max_peers(50) - .discovery_port(8093); + .discovery_port(8093) + .add_bootstrap_node(&debug1.spr); // Manually set listen addresses since builder method doesn't exist node2_config.listen_addrs = vec![ @@ -91,7 +94,6 @@ async fn test_two_node_network() -> Result<(), Box> { // Get debug information for both nodes println!("\n=== Node Debug Information ==="); - let debug1 = codex_bindings::debug(&node1).await?; let debug2 = codex_bindings::debug(&node2).await?; println!("Node 1 debug info:");