mirror of
https://github.com/dashpay/dash.git
synced 2024-12-26 04:22:55 +01:00
refactor: remove fMasternodeMode and fDisableGovernance from Qt code
This commit is contained in:
parent
9402ce7171
commit
b1527599e4
@ -65,6 +65,7 @@ public:
|
||||
virtual void getAllNewerThan(std::vector<CGovernanceObject> &objs, int64_t nMoreThanTime) = 0;
|
||||
virtual int32_t getObjAbsYesCount(const CGovernanceObject& obj, vote_signal_enum_t vote_signal) = 0;
|
||||
virtual bool getObjLocalValidity(const CGovernanceObject& obj, std::string& error, bool check_collateral) = 0;
|
||||
virtual bool isEnabled() = 0;
|
||||
virtual void setContext(NodeContext* context) {}
|
||||
};
|
||||
|
||||
@ -230,6 +231,9 @@ public:
|
||||
//! Is initial block download.
|
||||
virtual bool isInitialBlockDownload() = 0;
|
||||
|
||||
//! Is masternode.
|
||||
virtual bool isMasternode() = 0;
|
||||
|
||||
//! Get reindex.
|
||||
virtual bool getReindex() = 0;
|
||||
|
||||
|
@ -133,6 +133,13 @@ public:
|
||||
}
|
||||
return false;
|
||||
}
|
||||
bool isEnabled() override
|
||||
{
|
||||
if (context().govman != nullptr) {
|
||||
return context().govman->IsValid();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
void setContext(NodeContext* context) override
|
||||
{
|
||||
m_context = context;
|
||||
@ -477,6 +484,10 @@ public:
|
||||
}
|
||||
return active_chainstate->IsInitialBlockDownload();
|
||||
}
|
||||
bool isMasternode() override
|
||||
{
|
||||
return m_context->mn_activeman != nullptr;
|
||||
}
|
||||
bool getReindex() override { return ::fReindex; }
|
||||
bool getImporting() override { return ::fImporting; }
|
||||
void setNetworkActive(bool active) override
|
||||
|
@ -1483,7 +1483,7 @@ void BitcoinGUI::setNumBlocks(int count, const QDateTime& blockDate, const QStri
|
||||
tooltip += tr("Last received block was generated %1 ago.").arg(timeBehindText);
|
||||
tooltip += QString("<br>");
|
||||
tooltip += tr("Transactions after this will not yet be visible.");
|
||||
} else if (fDisableGovernance) {
|
||||
} else if (!m_node.gov().isEnabled()) {
|
||||
setAdditionalDataSyncProgress(1);
|
||||
}
|
||||
|
||||
|
@ -474,7 +474,7 @@ void OverviewPage::coinJoinStatus(bool fForce)
|
||||
if (!fForce && (clientModel->node().shutdownRequested() || !clientModel->masternodeSync().isBlockchainSynced())) return;
|
||||
|
||||
// Disable any PS UI for masternode or when autobackup is disabled or failed for whatever reason
|
||||
if (fMasternodeMode || nWalletBackups <= 0) {
|
||||
if (clientModel->node().isMasternode() || nWalletBackups <= 0) {
|
||||
DisableCoinJoinCompletely();
|
||||
if (nWalletBackups <= 0) {
|
||||
ui->labelCoinJoinEnabled->setToolTip(tr("Automatic backups are disabled, no mixing available!"));
|
||||
|
Loading…
Reference in New Issue
Block a user