mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-02-21 14:34:49 +01:00
Merge bitcoin-core/gui#673: Use fallback value for Version and User Agent during peer connection
c2a21c0670
gui: use fallback value for Version and User Agent during peer connection (Jon Atack) Pull request description: 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. An alternative would be to display nothing for both, as is the case currently for User Agent. ACKs for top commit: jarolrod: ACKc2a21c0670
furszy: code ACKc2a21c06
Tree-SHA512: 4f0060fa9abde120a2bb48c9dcc87894d9bb70c33e6ab43b22400a4bcd0ceff0fa098adf7f385b0a7a4cf5d7053463b36fe1232e19a8d5025eecd8db9833f73b
This commit is contained in:
commit
8fb3fd2ba4
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));
|
||||
ui->peerVersion->setText(QString::number(stats->nodeStats.nVersion));
|
||||
ui->peerSubversion->setText(QString::fromStdString(stats->nodeStats.cleanSubVer));
|
||||
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…
Add table
Reference in a new issue