mirror of
https://github.com/dashpay/dash.git
synced 2024-12-24 19:42:46 +01:00
merge bitcoin-core/gui#203: Display plain "Inbound" in peer details
This commit is contained in:
parent
582c6ec870
commit
57597df2f2
@ -1661,10 +1661,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");
|
||||
|
@ -398,7 +398,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(std::chrono::seconds dur);
|
||||
|
@ -479,7 +479,7 @@ RPCConsole::RPCConsole(interfaces::Node& node, QWidget* parent, Qt::WindowFlags
|
||||
|
||||
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")
|
||||
@ -1253,7 +1253,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 == NetPermissionFlags::None) {
|
||||
ui->peerPermissions->setText(tr("N/A"));
|
||||
|
Loading…
Reference in New Issue
Block a user