mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-03-05 14:06:27 -05:00
Showing local addresses on the Node Window
Adds a new row to the Node Window (debugwindow.ui) under the Network section which shows the LocalAddresses. fixes #564
This commit is contained in:
parent
a5d7aff867
commit
189c987386
2 changed files with 58 additions and 11 deletions
|
@ -249,6 +249,41 @@
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="9" column="0">
|
<item row="9" column="0">
|
||||||
|
<widget class="QLabel" name="label_14">
|
||||||
|
<property name="text">
|
||||||
|
<string>Local Addresses</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="9" column="1" colspan="2">
|
||||||
|
<widget class="QLabel" name="localAddresses">
|
||||||
|
<property name="cursor">
|
||||||
|
<cursorShape>IBeamCursor</cursorShape>
|
||||||
|
</property>
|
||||||
|
<property name="wordWrap">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Preferred" vsizetype="Minimum">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string notr="true">N/A</string>
|
||||||
|
</property>
|
||||||
|
<property name="textFormat">
|
||||||
|
<enum>Qt::PlainText</enum>
|
||||||
|
</property>
|
||||||
|
<property name="textInteractionFlags">
|
||||||
|
<set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set>
|
||||||
|
</property>
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>Network addresses that your Bitcoin node is currently using to communicate with other nodes.</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="10" column="0">
|
||||||
<widget class="QLabel" name="label_10">
|
<widget class="QLabel" name="label_10">
|
||||||
<property name="font">
|
<property name="font">
|
||||||
<font>
|
<font>
|
||||||
|
@ -261,14 +296,14 @@
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="10" column="0">
|
<item row="11" column="0">
|
||||||
<widget class="QLabel" name="label_3">
|
<widget class="QLabel" name="label_3">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Current block height</string>
|
<string>Current block height</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="10" column="1" colspan="2">
|
<item row="11" column="1" colspan="2">
|
||||||
<widget class="QLabel" name="numberOfBlocks">
|
<widget class="QLabel" name="numberOfBlocks">
|
||||||
<property name="cursor">
|
<property name="cursor">
|
||||||
<cursorShape>IBeamCursor</cursorShape>
|
<cursorShape>IBeamCursor</cursorShape>
|
||||||
|
@ -284,14 +319,14 @@
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="11" column="0">
|
<item row="12" column="0">
|
||||||
<widget class="QLabel" name="labelLastBlockTime">
|
<widget class="QLabel" name="labelLastBlockTime">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Last block time</string>
|
<string>Last block time</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="11" column="1" colspan="2">
|
<item row="12" column="1" colspan="2">
|
||||||
<widget class="QLabel" name="lastBlockTime">
|
<widget class="QLabel" name="lastBlockTime">
|
||||||
<property name="cursor">
|
<property name="cursor">
|
||||||
<cursorShape>IBeamCursor</cursorShape>
|
<cursorShape>IBeamCursor</cursorShape>
|
||||||
|
@ -307,7 +342,7 @@
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="12" column="0">
|
<item row="13" column="0">
|
||||||
<widget class="QLabel" name="labelMempoolTitle">
|
<widget class="QLabel" name="labelMempoolTitle">
|
||||||
<property name="font">
|
<property name="font">
|
||||||
<font>
|
<font>
|
||||||
|
@ -320,14 +355,14 @@
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="13" column="0">
|
<item row="14" column="0">
|
||||||
<widget class="QLabel" name="labelNumberOfTransactions">
|
<widget class="QLabel" name="labelNumberOfTransactions">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Current number of transactions</string>
|
<string>Current number of transactions</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="13" column="1">
|
<item row="14" column="1">
|
||||||
<widget class="QLabel" name="mempoolNumberTxs">
|
<widget class="QLabel" name="mempoolNumberTxs">
|
||||||
<property name="cursor">
|
<property name="cursor">
|
||||||
<cursorShape>IBeamCursor</cursorShape>
|
<cursorShape>IBeamCursor</cursorShape>
|
||||||
|
@ -343,14 +378,14 @@
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="14" column="0">
|
<item row="15" column="0">
|
||||||
<widget class="QLabel" name="labelMemoryUsage">
|
<widget class="QLabel" name="labelMemoryUsage">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Memory usage</string>
|
<string>Memory usage</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="14" column="1">
|
<item row="15" column="1">
|
||||||
<widget class="QLabel" name="mempoolSize">
|
<widget class="QLabel" name="mempoolSize">
|
||||||
<property name="cursor">
|
<property name="cursor">
|
||||||
<cursorShape>IBeamCursor</cursorShape>
|
<cursorShape>IBeamCursor</cursorShape>
|
||||||
|
@ -366,7 +401,7 @@
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="12" column="2" rowspan="3">
|
<item row="13" column="2" rowspan="3">
|
||||||
<layout class="QVBoxLayout" name="verticalLayoutDebugButton">
|
<layout class="QVBoxLayout" name="verticalLayoutDebugButton">
|
||||||
<property name="spacing">
|
<property name="spacing">
|
||||||
<number>3</number>
|
<number>3</number>
|
||||||
|
@ -406,7 +441,7 @@
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
<item row="15" column="0">
|
<item row="16" column="0">
|
||||||
<spacer name="verticalSpacer">
|
<spacer name="verticalSpacer">
|
||||||
<property name="orientation">
|
<property name="orientation">
|
||||||
<enum>Qt::Vertical</enum>
|
<enum>Qt::Vertical</enum>
|
||||||
|
|
|
@ -975,6 +975,18 @@ void RPCConsole::updateNetworkState()
|
||||||
}
|
}
|
||||||
|
|
||||||
ui->numberOfConnections->setText(connections);
|
ui->numberOfConnections->setText(connections);
|
||||||
|
|
||||||
|
QString local_addresses;
|
||||||
|
std::map<CNetAddr, LocalServiceInfo> hosts = clientModel->getNetLocalAddresses();
|
||||||
|
for (const auto& [addr, info] : hosts) {
|
||||||
|
local_addresses += QString::fromStdString(addr.ToStringAddr());
|
||||||
|
if (!addr.IsI2P()) local_addresses += ":" + QString::number(info.nPort);
|
||||||
|
local_addresses += ", ";
|
||||||
|
}
|
||||||
|
local_addresses.chop(2); // remove last ", "
|
||||||
|
if (local_addresses.isEmpty()) local_addresses = tr("None");
|
||||||
|
|
||||||
|
ui->localAddresses->setText(local_addresses);
|
||||||
}
|
}
|
||||||
|
|
||||||
void RPCConsole::setNumConnections(int count)
|
void RPCConsole::setNumConnections(int count)
|
||||||
|
|
Loading…
Add table
Reference in a new issue