Skip to content

fix(qt): avoid precision loss when generating proposal, use UniValue instead of QJsonObject, consistency in tab hiding behavior, minor bugfixes#7134

Merged
PastaPastaPasta merged 14 commits intodashpay:developfrom
kwvg:misc_fixes
Feb 12, 2026

Conversation

@kwvg
Copy link
Collaborator

@kwvg kwvg commented Feb 11, 2026

Additional Information

Resolution of preexisting bugs in develop, review feedback from dash#7112 and dash#7116 and fixes for bugs discovered when working on dash#7118.

Breaking Changes

None expected.

Checklist

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have added or updated relevant unit/integration/functional/e2e tests (note: N/A)
  • I have made corresponding changes to the documentation (note: N/A)
  • I have assigned this pull request to a milestone (for repository code-owners and collaborators only)

@kwvg kwvg added this to the 23.1 milestone Feb 11, 2026
@github-actions
Copy link

github-actions bot commented Feb 11, 2026

⚠️ Potential Merge Conflicts Detected

This PR has potential conflicts with the following open PRs:

Please coordinate with the authors of these PRs to avoid merge conflicts.

@kwvg kwvg force-pushed the misc_fixes branch 2 times, most recently from e28836a to 4d332ab Compare February 11, 2026 18:33
@kwvg kwvg marked this pull request as ready for review February 11, 2026 19:41
@coderabbitai
Copy link

coderabbitai bot commented Feb 11, 2026

Walkthrough

Added a new int64_t targetSpacing field to GOV::GovernanceInfo and propagated its use into proposal creation (ProposalWizard now constructed with WalletModel* and reads governance fields instead of a Node reference). Introduced Wallet::signGovernanceVote and a WalletImpl override; governancelist now calls wallet().signGovernanceVote. Qt UI: Proposal amounts use CAmount and display-unit signaling; proposal JSON uses UniValue with 64-bit epoch arithmetic; ProposalWizard is non-blocking. Masternode UI migrated std::set/std::map to QSet/QHash and changed updateDIP3List() to return bool. Networking StopNodes/Stop locking now clears reconnections under m_reconnections_mutex.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~30 minutes

Possibly related PRs

Suggested reviewers

  • knst
  • UdjinM6
🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 12.50% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes multiple main changes: precision loss fix, UniValue usage, tab hiding consistency, and bugfixes in the proposal generation and Qt code.
Description check ✅ Passed The description is directly related to the changeset, explaining the context (resolving preexisting bugs and review feedback) and noting that tests/docs are N/A where applicable.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

No actionable comments were generated in the recent review. 🎉

🧹 Recent nitpick comments
src/qt/governancelist.cpp (1)

152-166: Multiple simultaneous wizard instances possible with modeless dialog.

Since the dialog is now modeless, clicking "Create Proposal" multiple times will open multiple independent wizard windows. Consider tracking the wizard pointer (e.g., as a QPointer<ProposalWizard> member) and either raising the existing window or disabling the button while one is open, to prevent accidental duplicate submissions.


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 and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Fix all issues with AI agents
In `@src/qt/masternodelist.cpp`:
- Around line 186-194: The code clears m_mn_list_changed with exchange(false)
before calling updateDIP3List(), which prevents retries if updateDIP3List()
returns early; change the logic so you only clear the flag after a confirmed
successful update (or re-arm it if updateDIP3List() indicates it didn't
complete). Concretely, instead of m_mn_list_changed.exchange(false) at the top,
atomically test (load) the flag, call updateDIP3List() when set, and only call
m_mn_list_changed.store(false) (or leave cleared) after updateDIP3List() returns
success; if updateDIP3List() returns early/failure, ensure you set
m_mn_list_changed.store(true, std::memory_order_relaxed) so the "try again
later" path remains enabled. Use the existing symbols m_mn_list_changed,
updateDIP3List(), and the surrounding timing variables (nMnListUpdateSecods,
nSecondsToWait) to locate and update the conditional flow.

Copy link
Member

@PastaPastaPasta PastaPastaPasta left a comment

Choose a reason for hiding this comment

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

lgtm

Copy link

@UdjinM6 UdjinM6 left a comment

Choose a reason for hiding this comment

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

utACK 3329898

Copy link
Collaborator

@knst knst left a comment

Choose a reason for hiding this comment

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

utACK 3329898

@PastaPastaPasta PastaPastaPasta merged commit 1b6f8e3 into dashpay:develop Feb 12, 2026
44 of 48 checks passed
PastaPastaPasta added a commit that referenced this pull request Feb 13, 2026
…t, lifecycle icons, description dialogs, resumable proposal creation)

707ce77 refactor: `qt/proposalwizard.{cpp,h}` -> `qt/proposalcreate.{cpp,h}` (Kittywhiskers Van Gogh)
ce94c3e fix: improve responsiveness in update after user interaction (Kittywhiskers Van Gogh)
3d53afa fix: hold `cs_main` to for consistent state when fetching GovernanceInfo (Kittywhiskers Van Gogh)
a5ae10c fix: correct tooltip display unit bug, IBD status flickering (Kittywhiskers Van Gogh)
6cb7a40 qt: add pending status to signal unbroadcast proposals (Kittywhiskers Van Gogh)
d1e67ff fix: disable governance UI when node runs with `--disablegovernance` (Kittywhiskers Van Gogh)
9fb0c35 qt: make governance clock opt-in (Kittywhiskers Van Gogh)
a0da7de qt: disable proposal buttons until synced, creation button w/o funds (Kittywhiskers Van Gogh)
080c8fb qt: add "Resume Proposal" for post-confirmation broadcast (Kittywhiskers Van Gogh)
2883527 qt: remove remaining pages from proposal wizard (Kittywhiskers Van Gogh)
90e0375 qt: use `SendConfirmationDialog` instead of `QMessageBox` for confirm (Kittywhiskers Van Gogh)
3ca061f qt: drop JSON/hex confirmation page, use description dialogs instead (Kittywhiskers Van Gogh)
16314e7 qt: adjust layout of details page of proposal wizard to resemble DGT (Kittywhiskers Van Gogh)
2d8cffe qt: add blank canvas if there's no proposals to display (Kittywhiskers Van Gogh)
1a1d56e qt: list locally recorded proposals in "Governance" tab (Kittywhiskers Van Gogh)
28b67d3 qt: replace "Active" column with icons that reflect voting status (Kittywhiskers Van Gogh)
5f95737 qt: add voting ballot icon (Kittywhiskers Van Gogh)
af65c0e qt: cleanup proposal context menu, add copy JSON and visit URL options (Kittywhiskers Van Gogh)
552f591 qt: report more proposal information in description, calculate payments (Kittywhiskers Van Gogh)
4295471 qt: report proposal info using QTextEdit instead of an alert with JSON (Kittywhiskers Van Gogh)
f45fe85 qt: use monospace font for hashes in "Governance" tab (Kittywhiskers Van Gogh)
c0d8454 qt: report compact voting status and expanded details in tooltip (Kittywhiskers Van Gogh)
b2b9aa1 qt: change layout of "Governance" tab controls for readability (Kittywhiskers Van Gogh)
9bb7b0a qt: reorder columns in "Governance" tab, make width elastic for key cols (Kittywhiskers Van Gogh)
8257eac qt: decouple chain sync indicator from governance sync (Kittywhiskers Van Gogh)
662703e qt: add governance cycle status bar icon (Kittywhiskers Van Gogh)
a7328e9 qt: add moon phase icons for governance cycle indicator (Kittywhiskers Van Gogh)
c85e5cb qt: move proposal list fetch to thread and use debounce timer (Kittywhiskers Van Gogh)
5af2bb9 qt: expose `NotifyGovernanceChanged` signal to UI code (Kittywhiskers Van Gogh)
a773635 qt: move masternode list fetch logic to thread and use debounce timer (Kittywhiskers Van Gogh)

Pull request description:

  ## Additional Information

  * Depends on #7112
  * Depends on #7134

  | v23.0.2 (cdc5a63)  | This PR (WIP code) |
  | -------------------- | ------------------- |
  |  ![](https://github.com/user-attachments/assets/16335e93-7e76-4fc2-a4b0-99b251b06457) | ![](https://github.com/user-attachments/assets/754892fe-4d03-4c1c-b871-71558f06bcf7) |
  |  ![](https://github.com/user-attachments/assets/02aab041-3a0a-409a-9eac-49bf0978e890) | ![](https://github.com/user-attachments/assets/8ccc3a20-1ea9-44f4-8780-36b77f9fd88f) |
  |  ![](https://github.com/user-attachments/assets/41ff6ed2-4072-4607-bf37-4643d93ae0e2) | ![](https://github.com/user-attachments/assets/fc4ac6e9-543b-4f6d-ab60-014a6280f6fb) |
  |  <div align="center">Client doesn't have UI element</div> | ![](https://github.com/user-attachments/assets/f1ca0ab4-2a6c-4df9-95c4-a0667ec4dcb8) |
  |  <div align="center">Client doesn't produce a warning</div> | ![](https://github.com/user-attachments/assets/5098acd5-1928-485a-94a0-c9747a276ceb) |
  |  <div align="center">Client cannot show wallet-stored history</div> | ![](https://github.com/user-attachments/assets/f27e5e2e-616c-41bd-b370-171144e0787c) |

  #### Proposal Creation

  | v23.0.2 (cdc5a63)  | This PR (WIP code) |
  | -------------------- | ------------------- |
  | ![](https://github.com/user-attachments/assets/bb29cbd9-de00-4c90-83eb-8cd3681a27ef) | ![](https://github.com/user-attachments/assets/724748e1-e55e-4259-b48d-45465762e7bb) |
  | ![](https://github.com/user-attachments/assets/4cf73f49-f08b-428f-9cb0-a9cad30b9c42) | ![](https://github.com/user-attachments/assets/c4019760-d875-4704-9302-b7b1e2c7e9de) |
  | <div align="center">See above</div> | ![](https://github.com/user-attachments/assets/37e829f4-4367-426e-95ba-aaa6c6b64af8) |
  | ![](https://github.com/user-attachments/assets/54396ad0-4fb6-4757-92e0-f748208592ea) | ![](https://github.com/user-attachments/assets/a02e9e37-feb3-4790-872f-7ac14c49e3f7) |
  | <div align="center">See below</div> | ![](https://github.com/user-attachments/assets/8e788bdb-80cb-493f-a215-e4e13abae9e8) |
  | ![](https://github.com/user-attachments/assets/d1a3813e-f22b-4617-be89-babe0e06e28d) | ![](https://github.com/user-attachments/assets/abf4d09d-eb94-4665-9d27-8ec4b4928bef) |
  | ![](https://github.com/user-attachments/assets/64320939-9a37-4b6e-917a-4af40011238e) | <div align="center">No equivalent page. Broadcasting is made available after relay threshold met.</div> |
  | ![](https://github.com/user-attachments/assets/d4d47000-a342-4246-9ada-a62735d52445) | ![](https://github.com/user-attachments/assets/0f2b91c1-2fb8-4a61-8e77-619883bde1a0) |
  | ![](https://github.com/user-attachments/assets/b50407e1-cd48-4b33-833d-65652cb52d61) | <div align="center">No equivalent page</div> |
  | ![](https://github.com/user-attachments/assets/d2ac168d-5dde-456e-852a-37aee241adec) | ![](https://github.com/user-attachments/assets/dfbc6dfe-73e4-447c-83b1-5dc5fa639c88) |
  | <div align="center">No equivalent page</div> | ![](https://github.com/user-attachments/assets/0b1b9e25-d86b-40dd-a60c-c62997d5c0ff) |

  ## Breaking Changes

  None expected.

  ## Checklist

  - [x] I have performed a self-review of my own code
  - [x] I have commented my code, particularly in hard-to-understand areas
  - [x] I have added or updated relevant unit/integration/functional/e2e tests **(note: N/A)**
  - [x] I have made corresponding changes to the documentation **(note: N/A)**
  - [x] I have assigned this pull request to a milestone _(for repository code-owners and collaborators only)_

ACKs for top commit:
  UdjinM6:
    Seems to be working correctly.

Light ACK 707ce77

Tree-SHA512: 66db006c1aca6f9c5081ba6daff9b55ab82528342d3bf1083639f6f3a969773c9c8936cfbc61d190a658e1da6c937fb41ea99b7d7a2a4533e401758045d47b8e
@knst knst mentioned this pull request Feb 13, 2026
5 tasks
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.

4 participants