Skip to content

Commit a2c685c

Browse files
committed
Fix gossipsub config: mesh_outbound_min must be <= mesh_n_low
1 parent fd07c78 commit a2c685c

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

crates/network/src/behaviour.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,9 @@ impl MiniChainBehaviour {
4646
.heartbeat_interval(Duration::from_secs(1))
4747
.validation_mode(ValidationMode::Strict)
4848
.mesh_n(8) // Target mesh size (good for networks up to 64 nodes)
49-
.mesh_n_low(1) // Minimum mesh size - lowered for small networks
49+
.mesh_n_low(2) // Minimum mesh size before adding peers
5050
.mesh_n_high(16) // Maximum mesh size before pruning
51-
.mesh_outbound_min(2) // Minimum outbound peers (must be <= mesh_n/2)
51+
.mesh_outbound_min(1) // Minimum outbound peers (must be <= mesh_n_low)
5252
.gossip_lazy(6) // Peers to gossip to outside mesh
5353
.gossip_factor(0.25) // Fraction of peers to gossip to
5454
.do_px() // Enable peer exchange on PRUNE for discovery

crates/network/src/node.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -488,6 +488,6 @@ mod tests {
488488
async fn test_node_creation() {
489489
let config = NodeConfig::default();
490490
let node = NetworkNode::new(config).await;
491-
assert!(node.is_ok());
491+
assert!(node.is_ok(), "Node creation failed: {:?}", node.err());
492492
}
493493
}

0 commit comments

Comments
 (0)