refactor(core): make local constants crate-private
Decision K (spec §5): the local capacities and timings are defaults that will become configuration, so they are `pub(crate)`. The wire constants stay public. - MAX_PEERS, SUMMARY_INTERVAL_MS, REASSEMBLY_TIMEOUT_MS, SEND_QUEUE_CAP, MIN_MTU, EVENT_QUEUE_CAP, DROP_TABLE_CAP, BCAST_SENT_CAP, ACK_BUFFER_CAP and PEER_IDLE_MS are now `pub(crate)`; a compile_fail doctest pins it. - MIN_MTU's doc claimed it was the floor below which a fragment has no room. It is only the frag sweep's lower bound (BLE ATT's 23). The real floors are now stated on `Transport::mtu` and pinned by `consts::tests::mtu_floors`: 85 to carry every valid observation, 66 to fragment at all, 35 for an Ack, 26 for a summary. - tines-bt caps live connections with its own MAX_PEERS (8). - tines-sim's props mirror MAX_PEERS/SEND_QUEUE_CAP, checked against core through the hidden `conformance` module; the fuzz twin reads it there. - node.rs: drain_events' rustdoc no longer links the now-private consts. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -171,8 +171,8 @@ impl<S: Store, T: Transport> Node<S, T> {
|
||||
/// counted drop.
|
||||
///
|
||||
/// The returned [`heapless::Vec`] is capped at
|
||||
/// [`consts::EVENT_QUEUE_CAP`] confirmed deliveries plus the entire
|
||||
/// [`consts::DROP_TABLE_CAP`]-entry drop table and its overflow slot. Index
|
||||
/// `EVENT_QUEUE_CAP` (64) confirmed deliveries plus the entire
|
||||
/// `DROP_TABLE_CAP` (32)-entry drop table and its overflow slot. Index
|
||||
/// it directly — a [`NodeEvent::Delivered`] names the peer that held our
|
||||
/// broadcast and the broadcast's content-ID; a [`NodeEvent::Dropped`] names
|
||||
/// the peer and reason a dropped frame was rejected with.
|
||||
|
||||
Reference in New Issue
Block a user