fix(qt): avoid precision loss when generating proposal, use UniValue instead of QJsonObject, consistency in tab hiding behavior, minor bugfixes#7134
Conversation
|
e28836a to
4d332ab
Compare
WalkthroughAdded 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
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
No actionable comments were generated in the recent review. 🎉 🧹 Recent nitpick comments
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. Comment |
There was a problem hiding this comment.
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.
Also fetch network params once, remove unusual clamping logic as validators operate on 64-bit integers.
Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>
…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) | | -------------------- | ------------------- | |  |  | |  |  | |  |  | | <div align="center">Client doesn't have UI element</div> |  | | <div align="center">Client doesn't produce a warning</div> |  | | <div align="center">Client cannot show wallet-stored history</div> |  | #### Proposal Creation | v23.0.2 (cdc5a63) | This PR (WIP code) | | -------------------- | ------------------- | |  |  | |  |  | | <div align="center">See above</div> |  | |  |  | | <div align="center">See below</div> |  | |  |  | |  | <div align="center">No equivalent page. Broadcasting is made available after relay threshold met.</div> | |  |  | |  | <div align="center">No equivalent page</div> | |  |  | | <div align="center">No equivalent page</div> |  | ## 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
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