You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(macros): add peer_connectivity_ratio attribute to freenet_test
Add support for configuring partial connectivity between peer nodes in
freenet_test macro. This enables testing of subscription propagation in
partially connected networks.
Changes:
- Add peer_connectivity_ratio (0.0-1.0) attribute to FreenetTestArgs
- Generate blocked_addresses based on deterministic connectivity ratio
- Pre-compute peer network ports when connectivity ratio is specified
- Use (i * j) % 100 >= (ratio * 100) formula for deterministic blocking
This feature is needed for test_ping_partially_connected_network which
verifies subscription propagation across a network where regular nodes
have partial connectivity to each other but full connectivity to
gateways.
Example usage:
#[freenet_test(
nodes = ["gw-0", "gw-1", "node-0", "node-1", "node-2"],
gateways = ["gw-0", "gw-1"],
auto_connect_peers = true,
peer_connectivity_ratio = 0.5 // 50% connectivity between peers
)]
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
0 commit comments