doc: clarify RPC addnode 'add' vs 'onetry' connection limits

bitcoin/bitcoin: PR #36719

2 suggestions

Optional improvements

Link

[suggestion] · command help suggests the persistent addnode list is capped

The new “persistent list (limited to %u)” wording suggests a limit on list entries, although MAX_ADDNODE_CONNECTIONS limits simultaneous connections rather than list membership.

Location: src/rpc/net.cpp:357 (head).

Details and suggested fix

CConnman::AddNode rejects duplicate entries but otherwise appends without checking the list size. The semaphore in ThreadOpenAddedConnections limits how many connections it opens. Attaching “limited to %u” directly to “persistent list” can therefore make users expect a ninth distinct addnode add call to fail, despite the correct “at a time” wording in the surrounding description. Change the parenthetical to “at most %u of these connections are open at a time” so the parameter help preserves that distinction.


Link

[suggestion] · -netinfo tests miss the manual-count overflow boundary

The existing -netinfo assertions do not inspect the manual-peer column, so reverting the widened counter to eight bits would leave this regression undetected.

Location: src/bitcoin-cli.cpp:390 (head).

Details and suggested fix

test_netinfo runs without peers and checks only the first report line and local-services placement. Each manual peer on a recognized network increments m_manual_peers_count, which controls both the manual header and its outbound-row value. With uint8_t, 256 such peers wrap the counter to zero and hide the column. Add a constructed-input case with exactly 256 outbound manual peers on a recognized network, then assert that the column appears and displays 256. A fake HTTP server can return the crafted getpeerinfo/getnetworkinfo batch, avoiding hundreds of live peer connections.


Coverage details