You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Merge dashpay#6690: feat(qt): add governance voting functionality to Qt wallet
cf4e9e6 fix: move CGovernanceVote inline methods to header for wallet linkage (pasta)
6f0723a chore: run clang-format (pasta)
2db939e fix: address PR review comments (pasta)
bd0f59e feat(governance): implement SignGovernanceVote method in CWallet for vote signing (pasta)
13b4117 feat(governance): refactor vote signing logic into a helper function (pasta)
778a0b1 feat(gui): add tooltip for masternode count display in governance tab (pasta)
81d6648 chore: apply clang-format (pasta)
edfe1ee refactor(governance): avoid recursion in wallet unlock handling (pasta)
24240a6 docs: add release notes for governance voting GUI feature (pasta)
0caee40 feat(gui): add masternode count display to governance tab (pasta)
5ac8475 feat(gui): add governance voting functionality to Qt wallet (pasta)
Pull request description:
## Issue being fixed or feature implemented
- Why is this change required? Currently, users must use CLI commands (gobject vote-many) to vote on governance proposals, which is not user-friendly for non-technical users who prefer the GUI wallet.
- What problem does it solve? This eliminates the need to use command-line tools for governance voting, making the voting process accessible to all GUI wallet users who own masternodes.
## What was done?
This PR adds complete governance voting functionality to the Qt wallet interface:
- Added right-click context menu to governance proposals table with "Vote Yes", "Vote No", and "Vote Abstain" options
- Implemented voting capability detection that checks if the wallet contains any masternode voting keys
- Added vote signing and submission logic that matches the existing RPC implementation (gobject vote-many)
- Implemented network-specific signing:
- Testnet: Uses SignSpecialTxPayload with vote.GetSignatureHash()
- Other networks: Uses SignMessage with vote.GetSignatureString()
- Extended interfaces:
- Added processVoteAndRelay method to the GOV interface (interfaces/node.h)
- Added signSpecialTxPayload method to the wallet interface (interfaces/wallet.h)
- Added comprehensive error handling with detailed feedback showing success/failure counts and specific error messages
- Implemented wallet unlock handling that prompts for passphrase when needed
- Updates vote counts in the governance list after voting
## How Has This Been Tested?
- Tested on testnet with multiple masternodes in wallet
- Verified voting capability detection correctly identifies wallets with/without voting keys
- Confirmed votes are successfully submitted and accepted by the network
- Tested wallet unlock flow with encrypted wallets
- Verified testnet-specific signing works correctly
- Confirmed vote counts update in the governance list after voting
Testing environment: macOS, testnet, wallet with 3 masternode voting keys
https://github.com/user-attachments/assets/de777bf7-2e05-4751-9e56-98e273703e66
## Breaking Changes
None - this PR only adds new functionality to the GUI without modifying existing behavior.
## Checklist:
- [x] I have performed a self-review of my own code
- [x] I have commented my code, particularly in hard-to-understand areas
- [ ] I have added or updated relevant unit/integration/functional/e2e tests
- [ ] I have made corresponding changes to the documentation (@thephez)
- [x] I have assigned this pull request to a milestone (for repository code-owners and collaborators only)
ACKs for top commit:
UdjinM6:
light ACK cf4e9e6
Tree-SHA512: aec92043e2432f66d071dccf91d127b91728d35e84ad1ca9fe88c1e15b5c2545a6730108833e7f19f2ef69ac5fdaf4d08288ce9ea0051d123f5a07f2c5f1c91c
- Added governance proposal voting functionality to the Qt interface. Users with masternode voting keys can now vote on governance proposals directly from the governance tab via right-click context menu (#6690).
5
+
- Added masternode count display to governance tab showing how many masternodes the wallet can vote with (#6690).
0 commit comments