mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-02-22 15:04:44 +01:00
gui: return inbound {full, block} relay type in peer details
This commit is contained in:
parent
0944024309
commit
4f09615733
4 changed files with 5 additions and 5 deletions
|
@ -1079,7 +1079,7 @@
|
||||||
<item row="1" column="0">
|
<item row="1" column="0">
|
||||||
<widget class="QLabel" name="peerConnectionTypeLabel">
|
<widget class="QLabel" name="peerConnectionTypeLabel">
|
||||||
<property name="toolTip">
|
<property name="toolTip">
|
||||||
<string>The type of peer connection:<ul><li>Inbound: initiated by peer</li><li>Outbound Full Relay: default</li><li>Outbound Block Relay: does not relay transactions or addresses</li><li>Outbound Manual: added using RPC %1 or %2/%3 configuration options</li><li>Outbound Feeler: short-lived, for testing addresses</li><li>Outbound Address Fetch: short-lived, for soliciting addresses</li></ul></string>
|
<string>The type of peer connection:<ul><li>Inbound Full/Block Relay: initiated by peer</li><li>Outbound Full Relay: default</li><li>Outbound Block Relay: does not relay transactions or addresses</li><li>Outbound Manual: added using RPC %1 or %2/%3 configuration options</li><li>Outbound Feeler: short-lived, for testing addresses</li><li>Outbound Address Fetch: short-lived, for soliciting addresses</li></ul></string>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Connection Type</string>
|
<string>Connection Type</string>
|
||||||
|
|
|
@ -764,10 +764,10 @@ QString NetworkToQString(Network net)
|
||||||
assert(false);
|
assert(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
QString ConnectionTypeToQString(ConnectionType conn_type)
|
QString ConnectionTypeToQString(ConnectionType conn_type, bool relay_txes)
|
||||||
{
|
{
|
||||||
switch (conn_type) {
|
switch (conn_type) {
|
||||||
case ConnectionType::INBOUND: return QObject::tr("Inbound");
|
case ConnectionType::INBOUND: return relay_txes ? QObject::tr("Inbound Full Relay") : QObject::tr("Inbound Block Relay");
|
||||||
case ConnectionType::OUTBOUND_FULL_RELAY: return QObject::tr("Outbound Full Relay");
|
case ConnectionType::OUTBOUND_FULL_RELAY: return QObject::tr("Outbound Full Relay");
|
||||||
case ConnectionType::BLOCK_RELAY: return QObject::tr("Outbound Block Relay");
|
case ConnectionType::BLOCK_RELAY: return QObject::tr("Outbound Block Relay");
|
||||||
case ConnectionType::MANUAL: return QObject::tr("Outbound Manual");
|
case ConnectionType::MANUAL: return QObject::tr("Outbound Manual");
|
||||||
|
|
|
@ -230,7 +230,7 @@ namespace GUIUtil
|
||||||
QString NetworkToQString(Network net);
|
QString NetworkToQString(Network net);
|
||||||
|
|
||||||
/** Convert enum ConnectionType to QString */
|
/** Convert enum ConnectionType to QString */
|
||||||
QString ConnectionTypeToQString(ConnectionType conn_type);
|
QString ConnectionTypeToQString(ConnectionType conn_type, bool relay_txes);
|
||||||
|
|
||||||
/** Convert seconds into a QString with days, hours, mins, secs */
|
/** Convert seconds into a QString with days, hours, mins, secs */
|
||||||
QString formatDurationStr(int secs);
|
QString formatDurationStr(int secs);
|
||||||
|
|
|
@ -1112,7 +1112,7 @@ void RPCConsole::updateDetailWidget()
|
||||||
ui->timeoffset->setText(GUIUtil::formatTimeOffset(stats->nodeStats.nTimeOffset));
|
ui->timeoffset->setText(GUIUtil::formatTimeOffset(stats->nodeStats.nTimeOffset));
|
||||||
ui->peerVersion->setText(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->peerConnectionType->setText(GUIUtil::ConnectionTypeToQString(stats->nodeStats.m_conn_type));
|
ui->peerConnectionType->setText(GUIUtil::ConnectionTypeToQString(stats->nodeStats.m_conn_type, stats->nodeStats.fRelayTxes));
|
||||||
ui->peerNetwork->setText(GUIUtil::NetworkToQString(stats->nodeStats.m_network));
|
ui->peerNetwork->setText(GUIUtil::NetworkToQString(stats->nodeStats.m_network));
|
||||||
if (stats->nodeStats.m_permissionFlags == PF_NONE) {
|
if (stats->nodeStats.m_permissionFlags == PF_NONE) {
|
||||||
ui->peerPermissions->setText(tr("N/A"));
|
ui->peerPermissions->setText(tr("N/A"));
|
||||||
|
|
Loading…
Add table
Reference in a new issue