merge bitcoin-core/gui#206: Display fRelayTxes and bip152_highbandwidth_{to, from} in peer details

continuation of 3e8ba24c87 from dash#5964

includes:
- 142807af8b82e2372a03df893c50df4f4a96aca4
This commit is contained in:
Kittywhiskers Van Gogh 2024-06-09 11:28:00 +00:00
parent 239062192e
commit 1cbf3b9a53
No known key found for this signature in database
GPG Key ID: 30CD0C065E5C4AAD
2 changed files with 103 additions and 67 deletions

View File

@ -1150,14 +1150,17 @@
</widget>
</item>
<item row="9" column="0">
<widget class="QLabel" name="label_29">
<widget class="QLabel" name="peerHighBandwidthLabel">
<property name="toolTip">
<string>High bandwidth BIP152 compact block relay: %1</string>
</property>
<property name="text">
<string>Starting Block</string>
<string>High Bandwidth</string>
</property>
</widget>
</item>
<item row="9" column="2">
<widget class="QLabel" name="peerHeight">
<widget class="QLabel" name="peerHighBandwidth">
<property name="cursor">
<cursorShape>IBeamCursor</cursorShape>
</property>
@ -1173,14 +1176,14 @@
</widget>
</item>
<item row="10" column="0">
<widget class="QLabel" name="label_27">
<widget class="QLabel" name="label_29">
<property name="text">
<string>Synced Headers</string>
<string>Starting Block</string>
</property>
</widget>
</item>
<item row="10" column="2">
<widget class="QLabel" name="peerSyncHeight">
<widget class="QLabel" name="peerHeight">
<property name="cursor">
<cursorShape>IBeamCursor</cursorShape>
</property>
@ -1196,14 +1199,14 @@
</widget>
</item>
<item row="11" column="0">
<widget class="QLabel" name="label_25">
<widget class="QLabel" name="label_27">
<property name="text">
<string>Synced Blocks</string>
<string>Synced Headers</string>
</property>
</widget>
</item>
<item row="11" column="2">
<widget class="QLabel" name="peerCommonHeight">
<widget class="QLabel" name="peerSyncHeight">
<property name="cursor">
<cursorShape>IBeamCursor</cursorShape>
</property>
@ -1219,14 +1222,14 @@
</widget>
</item>
<item row="12" column="0">
<widget class="QLabel" name="label_22">
<widget class="QLabel" name="label_25">
<property name="text">
<string>Connection Time</string>
<string>Synced Blocks</string>
</property>
</widget>
</item>
<item row="12" column="2">
<widget class="QLabel" name="peerConnTime">
<widget class="QLabel" name="peerCommonHeight">
<property name="cursor">
<cursorShape>IBeamCursor</cursorShape>
</property>
@ -1242,17 +1245,14 @@
</widget>
</item>
<item row="13" column="0">
<widget class="QLabel" name="peerLastBlockLabel">
<property name="toolTip">
<string>Elapsed time since a novel block passing initial validity checks was received from this peer.</string>
</property>
<widget class="QLabel" name="label_22">
<property name="text">
<string>Last Block</string>
<string>Connection Time</string>
</property>
</widget>
</item>
<item row="13" column="2">
<widget class="QLabel" name="peerLastBlock">
<widget class="QLabel" name="peerConnTime">
<property name="cursor">
<cursorShape>IBeamCursor</cursorShape>
</property>
@ -1268,17 +1268,17 @@
</widget>
</item>
<item row="14" column="0">
<widget class="QLabel" name="peerLastTxLabel">
<widget class="QLabel" name="peerLastBlockLabel">
<property name="toolTip">
<string extracomment="Tooltip text for the Last Transaction field in the peer details area.">Elapsed time since a novel transaction accepted into our mempool was received from this peer.</string>
<string>Elapsed time since a novel block passing initial validity checks was received from this peer.</string>
</property>
<property name="text">
<string>Last Transaction</string>
<string>Last Block</string>
</property>
</widget>
</item>
<item row="14" column="2">
<widget class="QLabel" name="peerLastTx">
<widget class="QLabel" name="peerLastBlock">
<property name="cursor">
<cursorShape>IBeamCursor</cursorShape>
</property>
@ -1294,14 +1294,17 @@
</widget>
</item>
<item row="15" column="0">
<widget class="QLabel" name="label_15">
<widget class="QLabel" name="peerLastTxLabel">
<property name="toolTip">
<string extracomment="Tooltip text for the Last Transaction field in the peer details area.">Elapsed time since a novel transaction accepted into our mempool was received from this peer.</string>
</property>
<property name="text">
<string>Last Send</string>
<string>Last Transaction</string>
</property>
</widget>
</item>
<item row="15" column="2">
<widget class="QLabel" name="peerLastSend">
<widget class="QLabel" name="peerLastTx">
<property name="cursor">
<cursorShape>IBeamCursor</cursorShape>
</property>
@ -1317,14 +1320,14 @@
</widget>
</item>
<item row="16" column="0">
<widget class="QLabel" name="label_19">
<widget class="QLabel" name="label_15">
<property name="text">
<string>Last Receive</string>
<string>Last Send</string>
</property>
</widget>
</item>
<item row="16" column="2">
<widget class="QLabel" name="peerLastRecv">
<widget class="QLabel" name="peerLastSend">
<property name="cursor">
<cursorShape>IBeamCursor</cursorShape>
</property>
@ -1340,14 +1343,14 @@
</widget>
</item>
<item row="17" column="0">
<widget class="QLabel" name="label_18">
<widget class="QLabel" name="label_19">
<property name="text">
<string>Sent</string>
<string>Last Receive</string>
</property>
</widget>
</item>
<item row="17" column="2">
<widget class="QLabel" name="peerBytesSent">
<widget class="QLabel" name="peerLastRecv">
<property name="cursor">
<cursorShape>IBeamCursor</cursorShape>
</property>
@ -1363,14 +1366,14 @@
</widget>
</item>
<item row="18" column="0">
<widget class="QLabel" name="label_20">
<widget class="QLabel" name="label_18">
<property name="text">
<string>Received</string>
<string>Sent</string>
</property>
</widget>
</item>
<item row="18" column="2">
<widget class="QLabel" name="peerBytesRecv">
<widget class="QLabel" name="peerBytesSent">
<property name="cursor">
<cursorShape>IBeamCursor</cursorShape>
</property>
@ -1386,14 +1389,14 @@
</widget>
</item>
<item row="19" column="0">
<widget class="QLabel" name="label_26">
<widget class="QLabel" name="label_20">
<property name="text">
<string>Ping Time</string>
<string>Received</string>
</property>
</widget>
</item>
<item row="19" column="2">
<widget class="QLabel" name="peerPingTime">
<widget class="QLabel" name="peerBytesRecv">
<property name="cursor">
<cursorShape>IBeamCursor</cursorShape>
</property>
@ -1409,17 +1412,14 @@
</widget>
</item>
<item row="20" column="0">
<widget class="QLabel" name="peerPingWaitLabel">
<property name="toolTip">
<string>The duration of a currently outstanding ping.</string>
</property>
<widget class="QLabel" name="label_26">
<property name="text">
<string>Ping Wait</string>
<string>Ping Time</string>
</property>
</widget>
</item>
<item row="20" column="2">
<widget class="QLabel" name="peerPingWait">
<widget class="QLabel" name="peerPingTime">
<property name="cursor">
<cursorShape>IBeamCursor</cursorShape>
</property>
@ -1435,14 +1435,17 @@
</widget>
</item>
<item row="21" column="0">
<widget class="QLabel" name="peerMinPingLabel">
<widget class="QLabel" name="peerPingWaitLabel">
<property name="toolTip">
<string>The duration of a currently outstanding ping.</string>
</property>
<property name="text">
<string>Min Ping</string>
<string>Ping Wait</string>
</property>
</widget>
</item>
<item row="21" column="2">
<widget class="QLabel" name="peerMinPing">
<widget class="QLabel" name="peerPingWait">
<property name="cursor">
<cursorShape>IBeamCursor</cursorShape>
</property>
@ -1458,14 +1461,14 @@
</widget>
</item>
<item row="22" column="0">
<widget class="QLabel" name="label_timeoffset">
<widget class="QLabel" name="peerMinPingLabel">
<property name="text">
<string>Time Offset</string>
<string>Min Ping</string>
</property>
</widget>
</item>
<item row="22" column="2">
<widget class="QLabel" name="timeoffset">
<widget class="QLabel" name="peerMinPing">
<property name="cursor">
<cursorShape>IBeamCursor</cursorShape>
</property>
@ -1481,17 +1484,14 @@
</widget>
</item>
<item row="23" column="0">
<widget class="QLabel" name="peerMappedASLabel">
<property name="toolTip">
<string>The mapped Autonomous System used for diversifying peer selection.</string>
</property>
<widget class="QLabel" name="label_timeoffset">
<property name="text">
<string>Mapped AS</string>
<string>Time Offset</string>
</property>
</widget>
</item>
<item row="23" column="2">
<widget class="QLabel" name="peerMappedAS">
<widget class="QLabel" name="timeoffset">
<property name="cursor">
<cursorShape>IBeamCursor</cursorShape>
</property>
@ -1507,17 +1507,17 @@
</widget>
</item>
<item row="24" column="0">
<widget class="QLabel" name="peerAddrRelayEnabledLabel">
<widget class="QLabel" name="peerMappedASLabel">
<property name="toolTip">
<string extracomment="Tooltip text for the Address Relay field in the peer details area.">Whether we relay addresses to this peer.</string>
<string>The mapped Autonomous System used for diversifying peer selection.</string>
</property>
<property name="text">
<string>Address Relay</string>
<string>Mapped AS</string>
</property>
</widget>
</item>
<item row="24" column="2">
<widget class="QLabel" name="peerAddrRelayEnabled">
<widget class="QLabel" name="peerMappedAS">
<property name="cursor">
<cursorShape>IBeamCursor</cursorShape>
</property>
@ -1533,17 +1533,17 @@
</widget>
</item>
<item row="25" column="0">
<widget class="QLabel" name="peerAddrProcessedLabel">
<widget class="QLabel" name="peerAddrRelayEnabledLabel">
<property name="toolTip">
<string extracomment="Tooltip text for the Addresses Processed field in the peer details area.">Total number of addresses processed, excluding those dropped due to rate-limiting.</string>
<string extracomment="Tooltip text for the Address Relay field in the peer details area.">Whether we relay addresses to this peer.</string>
</property>
<property name="text">
<string>Addresses Processed</string>
<string>Address Relay</string>
</property>
</widget>
</item>
<item row="25" column="2">
<widget class="QLabel" name="peerAddrProcessed">
<widget class="QLabel" name="peerAddrRelayEnabled">
<property name="cursor">
<cursorShape>IBeamCursor</cursorShape>
</property>
@ -1559,17 +1559,17 @@
</widget>
</item>
<item row="26" column="0">
<widget class="QLabel" name="peerAddrRateLimitedLabel">
<widget class="QLabel" name="peerAddrProcessedLabel">
<property name="toolTip">
<string extracomment="Tooltip text for the Addresses Rate-Limited field in the peer details area.">Total number of addresses dropped due to rate-limiting.</string>
<string extracomment="Tooltip text for the Addresses Processed field in the peer details area.">Total number of addresses processed, excluding those dropped due to rate-limiting.</string>
</property>
<property name="text">
<string>Addresses Rate-Limited</string>
<string>Addresses Processed</string>
</property>
</widget>
</item>
<item row="26" column="2">
<widget class="QLabel" name="peerAddrRateLimited">
<widget class="QLabel" name="peerAddrProcessed">
<property name="cursor">
<cursorShape>IBeamCursor</cursorShape>
</property>
@ -1585,6 +1585,32 @@
</widget>
</item>
<item row="27" column="0">
<widget class="QLabel" name="peerAddrRateLimitedLabel">
<property name="toolTip">
<string extracomment="Tooltip text for the Addresses Rate-Limited field in the peer details area.">Total number of addresses dropped due to rate-limiting.</string>
</property>
<property name="text">
<string>Addresses Rate-Limited</string>
</property>
</widget>
</item>
<item row="27" column="2">
<widget class="QLabel" name="peerAddrRateLimited">
<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="28" column="0">
<spacer name="verticalSpacer_3">
<property name="orientation">
<enum>Qt::Vertical</enum>

View File

@ -514,6 +514,11 @@ RPCConsole::RPCConsole(interfaces::Node& node, QWidget* parent, Qt::WindowFlags
tr("Outbound Address Fetch: short-lived, for soliciting addresses")};
const QString list{"<ul><li>" + Join(CONNECTION_TYPE_DOC, QString("</li><li>")) + "</li></ul>"};
ui->peerConnectionTypeLabel->setToolTip(ui->peerConnectionTypeLabel->toolTip().arg(list));
const QString hb_list{"<ul><li>\""
+ tr("To") + "\" " + tr("we selected the peer for high bandwidth relay") + "</li><li>\""
+ tr("From") + "\" " + tr("the peer selected us for high bandwidth relay") + "</li><li>\""
+ tr("No") + "\" " + tr("no high bandwidth relay selected") + "</li></ul>"};
ui->peerHighBandwidthLabel->setToolTip(ui->peerHighBandwidthLabel->toolTip().arg(hb_list));
ui->dataDir->setToolTip(ui->dataDir->toolTip().arg(QString(nonbreaking_hyphen) + "datadir"));
ui->blocksDir->setToolTip(ui->blocksDir->toolTip().arg(QString(nonbreaking_hyphen) + "blocksdir"));
ui->openDebugLogfileButton->setToolTip(ui->openDebugLogfileButton->toolTip().arg(PACKAGE_NAME));
@ -1279,6 +1284,11 @@ void RPCConsole::updateDetailWidget()
ui->peerConnTime->setText(GUIUtil::formatDurationStr(time_now - std::chrono::seconds{stats->nodeStats.nTimeConnected}));
ui->peerLastBlock->setText(TimeDurationField(time_now, std::chrono::seconds{stats->nodeStats.nLastBlockTime}));
ui->peerLastTx->setText(TimeDurationField(time_now, std::chrono::seconds{stats->nodeStats.nLastTXTime}));
QString bip152_hb_settings;
if (stats->nodeStats.m_bip152_highbandwidth_to) bip152_hb_settings += "To";
if (stats->nodeStats.m_bip152_highbandwidth_from) bip152_hb_settings += (bip152_hb_settings == "" ? "From" : "/From");
if (bip152_hb_settings == "") bip152_hb_settings = "No";
ui->peerHighBandwidth->setText(bip152_hb_settings);
ui->peerLastSend->setText(TimeDurationField(time_now, stats->nodeStats.m_last_send));
ui->peerLastRecv->setText(TimeDurationField(time_now, stats->nodeStats.m_last_recv));
ui->peerBytesSent->setText(GUIUtil::formatBytes(stats->nodeStats.nSendBytes));