Skip to content

Commit c439ec7

Browse files
committed
Merge #2768: [GUI] Fix Passing Not Funded logic
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
2 parents d2a3091 + a450ea2 commit c439ec7

File tree

3 files changed

+4
-1
lines changed

3 files changed

+4
-1
lines changed

src/qt/clientmodel.cpp

+1
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ ClientModel::ClientModel(OptionsModel* optionsModel, QObject* parent) : QObject(
5050

5151
pollMnTimer = new QTimer(this);
5252
connect(pollMnTimer, &QTimer::timeout, this, &ClientModel::updateMnTimer);
53+
startMasternodesTimer();
5354

5455
subscribeToCoreSignals();
5556
}

src/qt/pivx/governancemodel.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ ProposalInfo GovernanceModel::buildProposalInfo(const CBudgetProposal* prop, boo
6565
status = ProposalInfo::FINISHED;
6666
} else if (isPassing) {
6767
status = ProposalInfo::PASSING;
68-
} else if (votesYes - votesNo > mnCount / 10) {
68+
} else if (allocatedAmount + prop->GetAmount() > getMaxAvailableBudgetAmount() && votesYes - votesNo > mnCount / 10) {
6969
status = ProposalInfo::PASSING_NOT_FUNDED;
7070
} else {
7171
status = ProposalInfo::NOT_PASSING;

src/qt/pivx/governancewidget.cpp

+2
Original file line numberDiff line numberDiff line change
@@ -270,6 +270,7 @@ void GovernanceWidget::loadWalletModel()
270270

271271
void GovernanceWidget::showEvent(QShowEvent *event)
272272
{
273+
clientModel->startMasternodesTimer();
273274
tryGridRefresh(true); // future: move to background worker
274275
if (!refreshTimer) refreshTimer = new QTimer(this);
275276
if (!refreshTimer->isActive()) {
@@ -281,6 +282,7 @@ void GovernanceWidget::showEvent(QShowEvent *event)
281282
void GovernanceWidget::hideEvent(QHideEvent *event)
282283
{
283284
refreshTimer->stop();
285+
clientModel->stopMasternodesTimer();
284286
}
285287

286288
void GovernanceWidget::wheelEvent(QWheelEvent* event)

0 commit comments

Comments
 (0)