Skip to content

Commit

Permalink
GUI: Present v3 onion addresses properly in MNs list.
Browse files Browse the repository at this point in the history
And correct MN start not working if the wallet is running both sides.
  • Loading branch information
furszy committed Aug 10, 2021
1 parent 337d43d commit b4515dc
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/masternode.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;); }

Expand Down
3 changes: 3 additions & 0 deletions src/qt/pivx/masternodeswidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
3 changes: 2 additions & 1 deletion src/qt/pivx/mnrow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down
2 changes: 1 addition & 1 deletion src/qt/pivx/mnrow.h
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit b4515dc

Please sign in to comment.