mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-03-14 23:43:58 +00:00
gui: return inbound {full, block} relay type in peer details
This commit is contained in:
parent
0944024309
commit
4f09615733
@ -1079,7 +1079,7 @@
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="peerConnectionTypeLabel">
|
||||
<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 name="text">
|
||||
<string>Connection Type</string>
|
||||
|
||||
@ -764,10 +764,10 @@ QString NetworkToQString(Network net)
|
||||
assert(false);
|
||||
}
|
||||
|
||||
QString ConnectionTypeToQString(ConnectionType conn_type)
|
||||
QString ConnectionTypeToQString(ConnectionType conn_type, bool relay_txes)
|
||||
{
|
||||
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::BLOCK_RELAY: return QObject::tr("Outbound Block Relay");
|
||||
case ConnectionType::MANUAL: return QObject::tr("Outbound Manual");
|
||||
|
||||
@ -230,7 +230,7 @@ namespace GUIUtil
|
||||
QString NetworkToQString(Network net);
|
||||
|
||||
/** 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 */
|
||||
QString formatDurationStr(int secs);
|
||||
|
||||
@ -1112,7 +1112,7 @@ void RPCConsole::updateDetailWidget()
|
||||
ui->timeoffset->setText(GUIUtil::formatTimeOffset(stats->nodeStats.nTimeOffset));
|
||||
ui->peerVersion->setText(QString::number(stats->nodeStats.nVersion));
|
||||
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));
|
||||
if (stats->nodeStats.m_permissionFlags == PF_NONE) {
|
||||
ui->peerPermissions->setText(tr("N/A"));
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user