mirror of
https://github.com/dashpay/dash.git
synced 2024-12-26 04:22:55 +01:00
Merge #18402: gui: display mapped AS in peers info window
76db4b260e4826a1e59a5e44c92e4c10ec986527 gui: avoid QT Designer/Form Editor re-formatting (Jon Atack) aae26053f958ae9a96a25d32c6341b14daaa4f26 gui: display Mapped AS in peers info window (Jon Atack) Pull request description: Continuing the asmap integration of #16702 which added `mapped_as` to the rpc getpeerinfo output, this adds the mapped AS to the Peers detail window in the GUI wallet. `$ src/qt/bitcoin-qt -asmap=<path-to-asmap-file>` (asmap on) ![Screenshot from 2020-03-22 12-29-56](https://user-images.githubusercontent.com/2415484/77248754-c0ae4600-6c33-11ea-9d27-a06560c180c0.jpg) `$ src/qt/bitcoin-qt` (asmap off) ![Screenshot from 2020-03-22 12-32-46](https://user-images.githubusercontent.com/2415484/77248749-bdb35580-6c33-11ea-925c-6e19ecc083ab.jpg) Added a tooltip and a couple of minor fixups. ACKs for top commit: laanwj: ACK 76db4b260e4826a1e59a5e44c92e4c10ec986527 Tree-SHA512: 5f44c05c247bfabc9c161884d3af47c50a571cd02777b320ce389e61efa47706adbf0ea5e6644ae40423cb579d8bd0bb3c84fc6b618293a7add8e4327f07f63f
This commit is contained in:
parent
66d5d5a798
commit
aebde26ca0
@ -693,12 +693,12 @@
|
|||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLineEdit" name="lineEdit">
|
<widget class="QLineEdit" name="lineEdit">
|
||||||
<property name="placeholderText">
|
|
||||||
<string/>
|
|
||||||
</property>
|
|
||||||
<property name="enabled">
|
<property name="enabled">
|
||||||
<bool>false</bool>
|
<bool>false</bool>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="placeholderText">
|
||||||
|
<string/>
|
||||||
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
@ -1403,6 +1403,32 @@
|
|||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="20" column="0">
|
<item row="20" column="0">
|
||||||
|
<widget class="QLabel" name="peerMappedASLabel">
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>The mapped Autonomous System used for diversifying peer selection.</string>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Mapped AS</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="20" column="2">
|
||||||
|
<widget class="QLabel" name="peerMappedAS">
|
||||||
|
<property name="cursor">
|
||||||
|
<cursorShape>IBeamCursor</cursorShape>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>N/A</string>
|
||||||
|
</property>
|
||||||
|
<property name="textFormat">
|
||||||
|
<enum>Qt::PlainText</enum>
|
||||||
|
</property>
|
||||||
|
<property name="textInteractionFlags">
|
||||||
|
<set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="21" column="0">
|
||||||
<spacer name="verticalSpacer_3">
|
<spacer name="verticalSpacer_3">
|
||||||
<property name="orientation">
|
<property name="orientation">
|
||||||
<enum>Qt::Vertical</enum>
|
<enum>Qt::Vertical</enum>
|
||||||
|
@ -1238,15 +1238,16 @@ void RPCConsole::updateNodeDetail(const CNodeCombinedStats *stats)
|
|||||||
ui->peerPingWait->setText(GUIUtil::formatPingTime(stats->nodeStats.m_ping_wait_usec));
|
ui->peerPingWait->setText(GUIUtil::formatPingTime(stats->nodeStats.m_ping_wait_usec));
|
||||||
ui->peerMinPing->setText(GUIUtil::formatPingTime(stats->nodeStats.m_min_ping_usec));
|
ui->peerMinPing->setText(GUIUtil::formatPingTime(stats->nodeStats.m_min_ping_usec));
|
||||||
ui->timeoffset->setText(GUIUtil::formatTimeOffset(stats->nodeStats.nTimeOffset));
|
ui->timeoffset->setText(GUIUtil::formatTimeOffset(stats->nodeStats.nTimeOffset));
|
||||||
ui->peerVersion->setText(QString("%1").arg(QString::number(stats->nodeStats.nVersion)));
|
ui->peerVersion->setText(QString::number(stats->nodeStats.nVersion));
|
||||||
ui->peerSubversion->setText(QString::fromStdString(stats->nodeStats.cleanSubVer));
|
ui->peerSubversion->setText(QString::fromStdString(stats->nodeStats.cleanSubVer));
|
||||||
ui->peerDirection->setText(stats->nodeStats.fInbound
|
ui->peerDirection->setText(stats->nodeStats.fInbound
|
||||||
? tr("Inbound")
|
? tr("Inbound")
|
||||||
: stats->nodeStats.fRelayTxes
|
: stats->nodeStats.fRelayTxes
|
||||||
? tr("Outbound")
|
? tr("Outbound")
|
||||||
: tr("Outbound block-relay"));
|
: tr("Outbound block-relay"));
|
||||||
ui->peerHeight->setText(QString("%1").arg(QString::number(stats->nodeStats.nStartingHeight)));
|
ui->peerHeight->setText(QString::number(stats->nodeStats.nStartingHeight));
|
||||||
ui->peerWhitelisted->setText(stats->nodeStats.m_legacyWhitelisted ? tr("Yes") : tr("No"));
|
ui->peerWhitelisted->setText(stats->nodeStats.m_legacyWhitelisted ? tr("Yes") : tr("No"));
|
||||||
|
ui->peerMappedAS->setText(stats->nodeStats.m_mapped_as != 0 ? QString::number(stats->nodeStats.m_mapped_as) : tr("N/A"));
|
||||||
auto dmn = clientModel->getMasternodeList().GetMNByService(stats->nodeStats.addr);
|
auto dmn = clientModel->getMasternodeList().GetMNByService(stats->nodeStats.addr);
|
||||||
if (dmn == nullptr) {
|
if (dmn == nullptr) {
|
||||||
ui->peerNodeType->setText(tr("Regular"));
|
ui->peerNodeType->setText(tr("Regular"));
|
||||||
|
Loading…
Reference in New Issue
Block a user