Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Display vote validity in listgovproposals and add validity filter #1740

Merged
merged 1 commit into from
Feb 8, 2023

Conversation

shohamc1
Copy link
Contributor

@shohamc1 shohamc1 commented Feb 8, 2023

What kind of PR is this?:

/kind feature

What this PR does / why we need it:

  • New valid field in vote output - denotes whether the vote is valid at cycle end
  • New valid argument to show only valid/invalid votes (defaults to show only valid votes)

Usage:

Show valid votes:

$ defi-cli listgovproposalvotes propId "all" 1 "{}" False True
[{'proposalId': 'e686c4205d893f1883652855ad957a71083a0dbd19e97bfacaf88fc9ceb5c642', 'masternodeId': '18a2c79448e8feeed9ee3e6a5ea9b2640062557ddac8e9ac2ee04f62ed484f24', 'cycle': 1, 'vote': 'YES', 'valid': True}, {'proposalId': 'e686c4205d893f1883652855ad957a71083a0dbd19e97bfacaf88fc9ceb5c642', 'masternodeId': '3a64ec587a39d3f5b1e1944c6f800709453ce8fe7a65a63cec8cc2dd26ad8671', 'cycle': 1, 'vote': 'YES', 'valid': True}, {'proposalId': 'e686c4205d893f1883652855ad957a71083a0dbd19e97bfacaf88fc9ceb5c642', 'masternodeId': 'e86c027861cc0af423313f4152a44a83296a388eb51bf1a6dde9bd75bed55fb4', 'cycle': 1, 'vote': 'YES', 'valid': True}]

Show invalid votes:

$ defi-cli listgovproposalvotes propId "all" 1 "{}" False False
[{'proposalId': '55684409f1cecd6dd7b16139be88993ced9a671f8682075a206452c1a16f8b01', 'masternodeId': '35db8101a4fb72d27af93622a20cdfee160466112252ac2866d5ccd564b55b25', 'cycle': 1, 'vote': 'YES', 'valid': False}]

Additional comments?:

Port of #1725

@shohamc1 shohamc1 requested review from Bushstar, Jouzo and Mixa84 February 8, 2023 03:51
@shohamc1 shohamc1 self-assigned this Feb 8, 2023
Bushstar
Bushstar previously approved these changes Feb 8, 2023
@shohamc1 shohamc1 force-pushed the listgovproposalvotes-invalid-votes branch from a61ef83 to 7cb6f01 Compare February 8, 2023 07:08
@prasannavl prasannavl mentioned this pull request Feb 9, 2023
19 tasks
@prasannavl prasannavl merged commit d2eaa8a into master Feb 8, 2023
@prasannavl prasannavl deleted the listgovproposalvotes-invalid-votes branch February 8, 2023 10:42
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