• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

tari-project / tari / 23005727524
62%

Build:
DEFAULT BRANCH: development
Ran 12 Mar 2026 03:09PM UTC
Jobs 1
Files 701
Run time 3min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

12 Mar 2026 02:00PM UTC coverage: 61.737% (-0.3%) from 62.017%
23005727524

push

github

web-flow
chore: remove neighbour/distance peer pool distinction from DHT connectivity (#7702)

DHT connectivity maintained two separate peer pools — a `neighbours`
pool (originally distance-ordered) and a `random_pool` — which became
functionally identical after XOR-distance selection was removed. This PR
collapses them into a single unified pool.

## DHT Connectivity (`comms/dht/src/connectivity/mod.rs`)

- Removed `neighbours: Vec<NodeId>` field; all managed peers live in
`random_pool`
- Total pool capacity = `num_neighbouring_nodes + num_random_nodes`
(config fields preserved for backward compat)
- Removed functions: `refresh_neighbour_pool`,
`refresh_neighbour_pool_if_required`, `num_connected_neighbours`,
`insert_neighbour`, `redial_neighbours_as_required`,
`fetch_neighbouring_peers`
- `replace_pool_peer` now has a single branch (random pool only)
- `log_status` reports a single peer pool instead of separate
neighbour/random pools
- Ticker loop drops the `refresh_neighbour_pool_if_required` call;
single `refresh_random_pool_if_required` handles everything

## Config & Builder (`config.rs`, `builder.rs`)

- Updated doc comments on `num_neighbouring_nodes` / `num_random_nodes`
to drop "neighbour" framing — they now describe pool partitioning, not
topology
- `DhtConnectivityConfig` comment updated accordingly

## Tests (`connectivity/test.rs`)

- `insert_neighbour` → `insert_into_pool` (tests unified
`insert_random_peer` cap behaviour)
- `added_neighbours` → `added_pool_peers`
- `replace_peer_when_peer_goes_offline` rewritten to not rely on
specific peer indices (random selection makes index-based assertions
fragile)
- `initialize` checks dial count rather than specific peer IDs

<!-- START COPILOT ORIGINAL PROMPT -->



<details>

<summary>Original prompt</summary>

> 
> ----
> 
> *This section details on the original issue you should resolve*
> 
> <issue_title>Investigate removing all notions of distance to
peer</issue_title>
> <issue_description>I think w... (continued)

98 of 115 new or added lines in 9 files covered. (85.22%)

72 existing lines in 18 files now uncovered.

70646 of 114431 relevant lines covered (61.74%)

227169.5 hits per line

New Missed Lines in Diff

Lines Coverage ∆ File
1
49.22
6.36% comms/dht/src/network_discovery/ready.rs
2
61.59
-0.27% comms/core/src/connectivity/manager.rs
2
80.0
1.08% comms/core/src/connectivity/proactive_dialer.rs
12
65.57
1.29% comms/dht/src/connectivity/mod.rs

Uncovered Existing Lines

Lines Coverage ∆ File
1
66.57
-0.29% base_layer/core/src/mempool/sync_protocol/mod.rs
1
87.08
0.03% comms/dht/src/actor.rs
1
0.0
0.0% comms/dht/src/network_discovery/discovering.rs
1
83.33
10.61% comms/dht/src/outbound/message_params.rs
1
58.02
5.02% comms/dht/src/outbound/requester.rs
2
85.05
-0.71% comms/core/src/connection_manager/manager.rs
2
50.0
2.91% comms/core/src/connectivity/selection.rs
2
83.39
-0.33% comms/core/src/protocol/rpc/client/mod.rs
3
80.68
-0.72% comms/core/src/connection_manager/peer_connection.rs
3
61.82
-1.36% comms/core/src/connectivity/requester.rs
4
80.54
-0.83% comms/core/src/noise/socket.rs
4
84.87
-4.13% comms/core/src/peer_manager/manager.rs
4
89.02
-1.46% comms/core/src/peer_manager/peer_storage_sql.rs
4
72.54
-2.07% comms/core/src/test_utils/mocks/connectivity_manager.rs
7
61.59
-0.27% comms/core/src/connectivity/manager.rs
8
92.13
-0.68% comms/core/src/peer_manager/storage/database.rs
10
64.6
-18.73% comms/core/src/peer_manager/node_id.rs
14
65.57
1.29% comms/dht/src/connectivity/mod.rs
Jobs
ID Job ID Ran Files Coverage
1 23005727524.1 12 Mar 2026 03:09PM UTC 701
61.74
GitHub Action Run
Source Files on build 23005727524
  • Tree
  • List 701
  • Changed 37
  • Source Changed 25
  • Coverage Changed 35
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #23005727524
  • d2d56d40 on github
  • Prev Build on development (#23000122457)
  • Next Build on development (#23040501324)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc