diff --git a/src/masternode.h b/src/masternode.h index 0e717a10ae384..6db193a89f2ec 100644 --- a/src/masternode.h +++ b/src/masternode.h @@ -113,6 +113,7 @@ class CMasternode : public CSignedMessage uint256 GetSignatureHash() const override; std::string GetStrMessage() const override; const CTxIn GetVin() const { return vin; }; + CPubKey GetPubKey() const { return pubKeyMasternode; } void SetLastPing(const CMasternodePing& _lastPing) { WITH_LOCK(cs, lastPing = _lastPing;); } diff --git a/src/qt/pivx/masternodeswidget.cpp b/src/qt/pivx/masternodeswidget.cpp index 53fa9ce1d8ba7..20d8d3b30099a 100644 --- a/src/qt/pivx/masternodeswidget.cpp +++ b/src/qt/pivx/masternodeswidget.cpp @@ -248,6 +248,9 @@ bool MasterNodesWidget::startMN(const CMasternodeConfig::CMasternodeEntry& mne, return false; mnodeman.UpdateMasternodeList(mnb); + if (activeMasternode.pubKeyMasternode == mnb.GetPubKey()) { + activeMasternode.EnableHotColdMasterNode(mnb.vin, mnb.addr); + } mnb.Relay(); return true; } diff --git a/src/qt/pivx/mnrow.cpp b/src/qt/pivx/mnrow.cpp index 603a44431ebd1..d24982e3a4e5f 100644 --- a/src/qt/pivx/mnrow.cpp +++ b/src/qt/pivx/mnrow.cpp @@ -17,9 +17,10 @@ MNRow::MNRow(QWidget *parent) : ui->lblDivisory->setStyleSheet("background-color:#bababa;"); } -void MNRow::updateView(QString address, QString label, QString status, bool wasCollateralAccepted) +void MNRow::updateView(QString address, const QString& label, QString status, bool wasCollateralAccepted) { ui->labelName->setText(label); + address = address.size() < 40 ? address : address.left(20) + "..." + address.right(20); ui->labelAddress->setText(address); if (!wasCollateralAccepted) status = tr("Collateral tx not found"); ui->labelDate->setText(tr("Status: %1").arg(status)); diff --git a/src/qt/pivx/mnrow.h b/src/qt/pivx/mnrow.h index 7f596c877899e..eac8aa514908b 100644 --- a/src/qt/pivx/mnrow.h +++ b/src/qt/pivx/mnrow.h @@ -19,7 +19,7 @@ class MNRow : public QWidget explicit MNRow(QWidget *parent = nullptr); ~MNRow(); - void updateView(QString address, QString label, QString status, bool wasCollateralAccepted); + void updateView(QString address, const QString& label, QString status, bool wasCollateralAccepted); Q_SIGNALS: void onMenuClicked();