mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-01-11 04:12:36 -03:00
gui: use fallback value for Version and User Agent during peer connection
During connection setup for a peer, getpeerinfo returns "version": 0, "subver": "" and the GUI Peers window displays 0 and an empty field, respectively. Give these fields the same behavior as the other fields in the GUI Peers window: display the fallback value in src/qt/forms/debugwindow.ui (i.e. "N/A") until a valid result is available after the peer connection completes.
This commit is contained in:
parent
b2e6d37b51
commit
c2a21c0670
1 changed files with 6 additions and 2 deletions
|
@ -1178,8 +1178,12 @@ void RPCConsole::updateDetailWidget()
|
|||
ui->peerPingTime->setText(GUIUtil::formatPingTime(stats->nodeStats.m_last_ping_time));
|
||||
ui->peerMinPing->setText(GUIUtil::formatPingTime(stats->nodeStats.m_min_ping_time));
|
||||
ui->timeoffset->setText(GUIUtil::formatTimeOffset(stats->nodeStats.nTimeOffset));
|
||||
if (stats->nodeStats.nVersion) {
|
||||
ui->peerVersion->setText(QString::number(stats->nodeStats.nVersion));
|
||||
}
|
||||
if (!stats->nodeStats.cleanSubVer.empty()) {
|
||||
ui->peerSubversion->setText(QString::fromStdString(stats->nodeStats.cleanSubVer));
|
||||
}
|
||||
ui->peerConnectionType->setText(GUIUtil::ConnectionTypeToQString(stats->nodeStats.m_conn_type, /*prepend_direction=*/true));
|
||||
ui->peerNetwork->setText(GUIUtil::NetworkToQString(stats->nodeStats.m_network));
|
||||
if (stats->nodeStats.m_permission_flags == NetPermissionFlags::None) {
|
||||
|
|
Loading…
Reference in a new issue