test: Small p2p_node_network_limited.py cleanups #36541

Manually merged
maflcko merged 2 commits from 2610-test-p2p-limited-cleanup into master 2026-10-19 09:20:15 +00:00 AGit
maflcko commented 2026-10-15 10:15:44 +00:00 (Migrated from github.com)
Fix a pre-existing typo and https://github.com/bitcoin/bitcoin/pull/36446#discussion_r4267602616
DrahtBot commented 2026-10-15 10:15:54 +00:00 (Migrated from github.com)

The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

External sites

Reviews

See the guideline and AI policy for information on the review process.

Type Reviewers
ACK mercie-ux

If your review is incorrectly listed, please copy-paste <!--meta-tag:bot-skip--> into the comment that the bot should ignore.

<!--e57a25ab6845829454e8d69fc972939a--> The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. <!--006a51241073e994b41acfe9ec718e94--> ### External sites * Code coverage & benchmarks: https://corecheck.dev/bitcoin/bitcoin/pulls/36541 * Ralph review <img src=https://review.fish.foo/assets/bitcoin/bitcoin/36541.png alt="Ralph review status"> https://git.fish.foo/bitcoin/bitcoin/pulls/36541#author-ralph <!--021abf342d371248e50ceaed478a90ca--> ### Reviews See [the guideline](https://github.com/bitcoin/bitcoin/blob/master/CONTRIBUTING.md#code-review) and [AI policy](https://github.com/bitcoin/bitcoin/blob/master/doc/AI_POLICY.md) for information on the review process. | Type | Reviewers | | ---- | --------- | | ACK | [mercie-ux](https://github.com/bitcoin/bitcoin/pull/36541#issuecomment-6214667646) | If your review is incorrectly listed, please copy-paste <code>&lt;!--meta-tag:bot-skip--&gt;</code> into the comment that the bot should ignore. <!--5faf32d7da4f0f540f40219e4f7537a3-->
First-time contributor

Base: cce32b16874e85e8a00cfa1a2190f0b6f4dcaf66
Head: fadcd0b64e3982a9c42a54faa0a3be8ab58caa04

Findings

Minor

Retain an observation barrier for the negative block-request check (test/functional/p2p_node_network_limited.py:154, head)

The pong-counter wait confirms a ping/pong roundtrip, but does not establish that the full node has completed the relevant block-download scheduling pass. Because the test snapshots peer state immediately afterward, an erroneous request could appear later and the test could pass. Retain a bounded observation window or wait for an observable completion signal before asserting that no request was made.

Design and approach

Concept and approach. The height descriptions are corrected, but the reason for removing the observation period is not established: a ping/pong roundtrip does not prove that the relevant block-download scheduling decision has run. Retain a bounded observation window or use a completion signal that proves the decision has run.

Full review report

<!-- forgejo-review-bot:bitcoin/bitcoin --> Base: `cce32b16874e85e8a00cfa1a2190f0b6f4dcaf66` Head: `fadcd0b64e3982a9c42a54faa0a3be8ab58caa04` ##### Findings **Minor** **Retain an observation barrier for the negative block-request check** (test/functional/p2p_node_network_limited.py:154, head) The pong-counter wait confirms a ping/pong roundtrip, but does not establish that the full node has completed the relevant block-download scheduling pass. Because the test snapshots peer state immediately afterward, an erroneous request could appear later and the test could pass. Retain a bounded observation window or wait for an observable completion signal before asserting that no request was made. ##### Design and approach **Concept and approach.** The height descriptions are corrected, but the reason for removing the observation period is not established: a ping/pong roundtrip does not prove that the relevant block-download scheduling decision has run. Retain a bounded observation window or use a completion signal that proves the decision has run. [Full review report](<https://review.fish.foo/traces/36541-fadcd0b64e3982a9c42a54faa0a3be8ab58caa04-803-1.html>)
mercie-ux commented 2026-10-16 11:39:03 +00:00 (Migrated from github.com)

ACK fadcd0b64e

removing && !IsLimitedPeer(peer) from the IBD download condition causes the inflightassertion to fail immediately.

ACK fadcd0b64e removing `&& !IsLimitedPeer(peer)` from the IBD download condition causes the `inflight`assertion to fail immediately.
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
bitcoin/bitcoin!36541
No description provided.