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

[GUI][Bug] Don't set a proposal's status to PASSING_NOT_FUNDED prematurely #2717

Merged
merged 5 commits into from
Jan 24, 2022

Conversation

Fuzzbawls
Copy link
Collaborator

Simply checking that there are more "yes" votes than "no" votes isn't
enough context to determine if a proposal should be in a passing state
(PASSING or PASSING_NOT_FUNDED)

Also, Set a unique label text for proposals that are passing but there aren't
enough funds left in the budget to find them.


Also includes some very light refactoring/cleanup in related files and a compile-time warning fix.

There is some follow-up refactoring to be done, but will do that in a separate PR as it falls out-of-scope for this PR.

`name.toUtf8().size()` is already an `int`, so the cast needs to be for
`PROP_NAME_MAX_SIZE`, which is a `size_t`
@Fuzzbawls Fuzzbawls added this to the 6.0.0 milestone Jan 10, 2022
@Fuzzbawls Fuzzbawls self-assigned this Jan 10, 2022
random-zebra
random-zebra previously approved these changes Jan 11, 2022
Copy link

@random-zebra random-zebra left a comment

Choose a reason for hiding this comment

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

utACK 55f20c3

Copy link

@furszy furszy left a comment

Choose a reason for hiding this comment

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

Concept ACK

src/qt/pivx/governancemodel.h Outdated Show resolved Hide resolved
src/qt/pivx/proposalcard.cpp Outdated Show resolved Hide resolved
src/qt/pivx/governancemodel.h Outdated Show resolved Hide resolved
src/qt/pivx/governancemodel.cpp Outdated Show resolved Hide resolved
@Fuzzbawls
Copy link
Collaborator Author

updated per feedback

Simply checking that there are more "yes" votes than "no" votes isn't
enough context to determine if a proposal should be in a passing state
(`PASSING` or `PASSING_NOT_FUNDED`)

clientModel: cache plain masternodes count
@Fuzzbawls Fuzzbawls force-pushed the 2022_gui-overfunded-proposals branch from c844ebf to 52cbb9e Compare January 23, 2022 09:10
@Fuzzbawls
Copy link
Collaborator Author

I've extracted out the const qualifier changes as they are not directly tied to the bug that this PR fixes, and there are many more instances of such usage within our codebase that would be better handled in a dedicated PR.

furszy
furszy previously approved these changes Jan 23, 2022
Copy link

@furszy furszy left a comment

Choose a reason for hiding this comment

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

Sounds good, ACK 52cbb9e

Comment on lines 64 to 67
setStatusAndVotes( tr("Not Passing"), (int)percentageNo);
} else if (proposalInfo.status == ProposalInfo::PASSING_NOT_FUNDED) {
cssClassStatus = "card-status-not-passing";
setStatusAndVotes( tr("Over Budget"), (int)percentageNo);
Copy link

Choose a reason for hiding this comment

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

nit: extra whitespaces

Set a unique label text for proposals that are passing but there aren't
enough funds left in the budget to find them.
Copy link

@random-zebra random-zebra left a comment

Choose a reason for hiding this comment

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

ACK 8a8e089

Copy link

@furszy furszy left a comment

Choose a reason for hiding this comment

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

ACK 8a8e089 and merging..

Side note, GA failure is fixed in #2722.

@furszy furszy merged commit 6c33de8 into PIVX-Project:master Jan 24, 2022
@Fuzzbawls Fuzzbawls modified the milestones: 6.0.0, 5.5.0 Sep 11, 2022
Fuzzbawls added a commit to Fuzzbawls/PIVX that referenced this pull request Sep 11, 2022
Followup to PIVX-Project#2717 which was incorrectly marking proposals as Over Budget
 instead of Not Passing
Fuzzbawls added a commit to Fuzzbawls/PIVX that referenced this pull request Sep 17, 2022
Followup to PIVX-Project#2717 which was incorrectly marking proposals as Over Budget
 instead of Not Passing
Fuzzbawls added a commit that referenced this pull request Sep 25, 2022
a450ea2 [GUI] Start MN update timer on launch and on governance page. (Fuzzbawls)
2ba665c [GUI] Fix Passing Not Funded logic (Fuzzbawls)

Pull request description:

  Followup to #2717 which was incorrectly marking proposals as Over Budget
   instead of Not Passing

ACKs for top commit:
  yenachar:
    ACK a450ea2

Tree-SHA512: e5d2f7da62397328987c941b4544906ad3a161d3501c825188c3723a7cd3d3366a85968e9730353a7e832a1faa46cdb3d2cef413b90cb24f7f2a639c9f66f67c
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants