Commit c2ed5f7
committed
fix(network): tighten TcpTransport trait impl per review
- broadcast_message: replace the all-three-tier match with explicit
unreachable!() for T1/T3. The previous debug_assert + match masked
the fact that broadcast is only valid on T2; the unreachable arms
document and enforce the trait contract directly.
- disconnect_peer: drop the early `return` after the first matching
tier. A peer can be connected on multiple tiers simultaneously
(e.g. T1 + T2 for a validator); stop the connection on every tier
we find it on, otherwise a partial disconnect leaves a stale entry.
Addresses VanBarbascu's review on #15575.1 parent e04072d commit c2ed5f7
1 file changed
Lines changed: 9 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
31 | | - | |
| 31 | + | |
| 32 | + | |
32 | 33 | | |
33 | | - | |
34 | 34 | | |
35 | | - | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
36 | 38 | | |
37 | 39 | | |
38 | 40 | | |
39 | 41 | | |
40 | | - | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
41 | 46 | | |
42 | 47 | | |
43 | 48 | | |
44 | 49 | | |
45 | | - | |
46 | 50 | | |
47 | 51 | | |
48 | 52 | | |
| |||
0 commit comments