diff options
author | Jonas Schnelli <dev@jonasschnelli.ch> | 2021-02-05 18:48:34 +0100 |
---|---|---|
committer | Jonas Schnelli <dev@jonasschnelli.ch> | 2021-02-05 18:48:39 +0100 |
commit | 6c6140846f37de8c132b3b6abf09f3d7940554a7 (patch) | |
tree | 63c0ce6ea9522e674201e7f35a51845c03ae28c5 /src | |
parent | 173cf31299eba8176a82499932dd511676a607ff (diff) | |
parent | 506e6585a54818d0613a067f91c0bac2f308a48c (diff) | |
download | bitcoin-6c6140846f37de8c132b3b6abf09f3d7940554a7.tar.xz |
Merge bitcoin-core/gui#203: Display plain "Inbound" in peer details
506e6585a54818d0613a067f91c0bac2f308a48c gui: display plain "Inbound" in peer details (Jon Atack)
Pull request description:
Alternative version to #201.
ACKs for top commit:
MarcoFalke:
ACK 506e6585a54818d0613a067f91c0bac2f308a48c
jonasschnelli:
utACK 506e6585a54818d0613a067f91c0bac2f308a48c
Tree-SHA512: 88d141b14684c1dcdff47f7ba241e5a7c42c14da3d9aaa89f1649235a64fd26bc5a6055707dc07992cd9d8c05d143754f6dd51ccee69fd4309336dd07c52e61c
Diffstat (limited to 'src')
-rw-r--r-- | src/qt/guiutil.cpp | 4 | ||||
-rw-r--r-- | src/qt/guiutil.h | 2 | ||||
-rw-r--r-- | src/qt/rpcconsole.cpp | 4 |
3 files changed, 5 insertions, 5 deletions
diff --git a/src/qt/guiutil.cpp b/src/qt/guiutil.cpp index 376acf0963..0c2bbe9516 100644 --- a/src/qt/guiutil.cpp +++ b/src/qt/guiutil.cpp @@ -766,10 +766,10 @@ QString NetworkToQString(Network net) assert(false); } -QString ConnectionTypeToQString(ConnectionType conn_type, bool relay_txes) +QString ConnectionTypeToQString(ConnectionType conn_type) { switch (conn_type) { - case ConnectionType::INBOUND: return relay_txes ? QObject::tr("Inbound Full Relay") : QObject::tr("Inbound Block Relay"); + case ConnectionType::INBOUND: return QObject::tr("Inbound"); 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"); diff --git a/src/qt/guiutil.h b/src/qt/guiutil.h index edfb5b13a2..9fb108dff9 100644 --- a/src/qt/guiutil.h +++ b/src/qt/guiutil.h @@ -233,7 +233,7 @@ namespace GUIUtil QString NetworkToQString(Network net); /** Convert enum ConnectionType to QString */ - QString ConnectionTypeToQString(ConnectionType conn_type, bool relay_txes); + QString ConnectionTypeToQString(ConnectionType conn_type); /** Convert seconds into a QString with days, hours, mins, secs */ QString formatDurationStr(int secs); diff --git a/src/qt/rpcconsole.cpp b/src/qt/rpcconsole.cpp index a252685d2f..2758ee351a 100644 --- a/src/qt/rpcconsole.cpp +++ b/src/qt/rpcconsole.cpp @@ -462,7 +462,7 @@ RPCConsole::RPCConsole(interfaces::Node& node, const PlatformStyle *_platformSty constexpr QChar nonbreaking_hyphen(8209); const std::vector<QString> CONNECTION_TYPE_DOC{ - tr("Inbound Full/Block Relay: initiated by peer"), + tr("Inbound: initiated by peer"), tr("Outbound Full Relay: default"), tr("Outbound Block Relay: does not relay transactions or addresses"), tr("Outbound Manual: added using RPC %1 or %2/%3 configuration options") @@ -1120,7 +1120,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, stats->nodeStats.fRelayTxes)); + ui->peerConnectionType->setText(GUIUtil::ConnectionTypeToQString(stats->nodeStats.m_conn_type)); ui->peerNetwork->setText(GUIUtil::NetworkToQString(stats->nodeStats.m_network)); if (stats->nodeStats.m_permissionFlags == PF_NONE) { ui->peerPermissions->setText(tr("N/A")); |