Skip to content

test: deduplicate the mnlistdiff P2P helper and drop dead helpers in Dash functional tests - #7877

Merged
PastaPastaPasta merged 2 commits into
dashpay:developfrom
PastaPastaPasta:test/dash-functional-test-cleanup
Oct 14, 2026
Merged

PastaPastaPasta merged 2 commits into
dashpay:developfrom
PastaPastaPasta:test/dash-functional-test-cleanup

Conversation

@PastaPastaPasta

Copy link
Copy Markdown
Member

Issue being fixed or feature implemented

Several Dash functional tests carry copy-pasted or dead helper code. One copy of the mnlistdiff P2P helper even has a TODO: this helper used in many tests, find a new home for it.

What was done?

  • feature_dip4_coinbasemerkleroots, feature_llmq_evo, feature_llmq_rotation and feature_protx_version each defined the same TestP2PConn class. It now lives once in test_framework/p2p.py as P2PMnListDiffStore, next to the other P2PInterface subclasses. wait_for_mnlistdiff() was only called from getmnlistdiff(), so it is inlined.
  • feature_mnehf: ensure_tx_is_not_mined() is never called, and no caller of send_tx() passes expected_error/reason, so its error-handling branch was dead. send_tx() is now a one-liner.
  • interface_zmq_dash: generate_blocks() is never called.
  • DashTestFramework.dynamically_start_masternode() is never called.
  • Three commented-out code lines removed.

Net: -105 lines.

How Has This Been Tested?

Ran every touched test locally on Linux x86_64 (debug build): feature_dip4_coinbasemerkleroots, feature_llmq_evo, feature_llmq_rotation, feature_protx_version, feature_mnehf, feature_governance, feature_llmq_chainlocks and interface_zmq_dash all pass. On a heavily loaded box, interface_zmq_dash timed out the first two times in mine_cycle_quorum (generatetoaddress took >30s) and passed on the next run. The change to that file only removes an unused method and a comment. lint-python.py reports nothing new.

Breaking Changes

None.

Checklist:

  • I have performed a self-review of my own code
  • I have made corresponding changes to the documentation
  • I have assigned this pull request to a milestone (for repository code-owners and collaborators only)

🤖 Generated with Claude Code

PastaPastaPasta and others added 2 commits October 13, 2026 21:22
feature_dip4_coinbasemerkleroots, feature_llmq_evo, feature_llmq_rotation
and feature_protx_version each defined the same TestP2PConn class (one
copy carried a TODO asking for a new home). Move it to test_framework/p2p.py
as P2PMnListDiffStore, next to the other P2PInterface subclasses.

wait_for_mnlistdiff() was only called from getmnlistdiff(), so it is
inlined there.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- feature_mnehf: ensure_tx_is_not_mined() is never called, and no caller
  of send_tx() passes expected_error or reason, so its error-handling
  branch is dead.
- interface_zmq_dash: generate_blocks() is never called.
- DashTestFramework: dynamically_start_masternode() is never called.
- Drop three commented-out code lines.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 13, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-13T21:28:11.742341Z 3d945ca PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@thepastaclaw

thepastaclaw commented Oct 13, 2026 •

Copy link
Copy Markdown
Collaborator

✅ Final review complete — no blockers (commit 3d945ca) · triage: low

@coderabbitai

coderabbitai Bot commented Oct 13, 2026

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: ac171ae9-2f1f-4a60-9921-2af2572c48c3
📥 Commits

Reviewing files that changed from the base of the PR and between 3ddad48 and 3d945ca.

📒 Files selected for processing: 10
  • test/functional/feature_dip4_coinbasemerkleroots.py
  • test/functional/feature_governance.py
  • test/functional/feature_llmq_chainlocks.py
  • test/functional/feature_llmq_evo.py
  • test/functional/feature_llmq_rotation.py
  • test/functional/feature_mnehf.py
  • test/functional/feature_protx_version.py
  • test/functional/interface_zmq_dash.py
  • test/functional/test_framework/p2p.py
  • test/functional/test_framework/test_framework.py
💤 Files with no reviewable changes: 4
  • test/functional/feature_llmq_chainlocks.py
  • test/functional/feature_governance.py
  • test/functional/interface_zmq_dash.py
  • test/functional/test_framework/test_framework.py

Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 3 remain after this review.

Walkthrough

Functional tests now use a shared P2PMnListDiffStore peer to request and receive masternode-list diffs. Other changes update a governance reconnection call, remove an inactive assertion and unused test helpers, simplify transaction submission, and remove a framework method.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~15 minutes

Merge Risk: ⚪ Minimal · up to 3d945

This cleanup preserves the reviewed test behavior and removes unused helpers. No concrete issue remains that should block merging.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 5.56% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 18 functions across 6 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 passed
Check name Status Explanation
Title check Passed The title clearly summarizes the main changes: deduplicating the masternode-list diff P2P helper and removing unused helpers from functional tests.
Description check Passed The description directly explains the helper deduplication, dead-code removal, affected files, testing performed, and lack of breaking changes.
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
  • Fix all pre-merge checks with AI
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@thepastaclaw thepastaclaw left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Final validation — Phase 1 + Phase 2

The exact reviewed range is a clean, behavior-preserving test-only cleanup. The shared P2PMnListDiffStore preserves the prior mnlistdiff request, state-reset, response, and timeout behavior, and the removed helpers have no remaining callers; no actionable in-scope defects were found. Lint and ClangFormat CI checks passed, while six platform cache checks were queued in the supplied snapshot; this static review did not run builds or tests.

Review provenance

Source: reviewer 1: glm-5.3-flash (agent: phase1-reviewer, role: general); reviewer 2: gpt-6.1-sol (agent: phase2-reviewer, role: general); reviewer 3: gpt-6.1-sol (agent: phase2-reviewer, role: dash-core-commit-history); final verifier: gpt-6.1-sol (agent: sol-verifier, role: final-verifier)

  • Triage: low by gpt-6.1-sol (effort low) — This is a small, contained functional-test refactor that deduplicates helpers and removes confirmed dead code without changing production behavior or critical surfaces.
  • Phase 1 reviewers: glm-5.3-flash — general (completed, effort high); agent phase1-reviewer
  • Phase 1 model: glm-5.3-flash — zai quota: 5h 97% left, weekly 95% left; passed over gemini-3.8-flash-high (antigravity below 15% reserve: weekly 14% left, 5h 100% left)
  • Fresh verifier: gpt-6.1-sol — final-verifier; agent sol-verifier
  • Phase 2 reviewers: gpt-6.1-sol — general (completed, effort medium); agent phase2-reviewer, gpt-6.1-sol — dash-core-commit-history (completed, effort medium); agent phase2-reviewer

@thepastaclaw thepastaclaw added the pastaclaw:approved thepastaclaw's latest review approved this PR label Oct 13, 2026

@PastaPastaPasta PastaPastaPasta left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

approved

@PastaPastaPasta
PastaPastaPasta merged commit fcb8ccb into dashpay:develop Oct 14, 2026
45 checks passed
@thepastaclaw thepastaclaw removed the pastaclaw:approved thepastaclaw's latest review approved this PR label Oct 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants