aboutsummaryrefslogtreecommitdiff
path: root/src/qt/rpcconsole.cpp
diff options
context:
space:
mode:
authorShashwat <svangani239@gmail.com>2021-07-20 21:57:55 +0530
committerShashwat <svangani239@gmail.com>2021-08-26 23:33:27 +0530
commitab1461d5d36b70fd4982679ac6143c25e7617dbf (patch)
tree5fbc20d902830a558e503752305c3c574e8c6819 /src/qt/rpcconsole.cpp
parent201c5e4aec5210b258644ff96379cda0ca7273ab (diff)
downloadbitcoin-ab1461d5d36b70fd4982679ac6143c25e7617dbf.tar.xz
qt: Add copy IP/Netmask action for banned peer
This adds a copy IP/Netmask context menu action for peers in the banned peer table
Diffstat (limited to 'src/qt/rpcconsole.cpp')
-rw-r--r--src/qt/rpcconsole.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/qt/rpcconsole.cpp b/src/qt/rpcconsole.cpp
index 56f55363b2..814fd9d1e0 100644
--- a/src/qt/rpcconsole.cpp
+++ b/src/qt/rpcconsole.cpp
@@ -706,6 +706,13 @@ void RPCConsole::setClientModel(ClientModel *model, int bestblock_height, int64_
// create ban table context menu
banTableContextMenu = new QMenu(this);
+ /*: Context menu action to copy the IP/Netmask of a banned peer.
+ IP/Netmask is the combination of a peer's IP address and its Netmask.
+ For IP address see: https://en.wikipedia.org/wiki/IP_address */
+ banTableContextMenu->addAction(tr("&Copy IP/Netmask"), [this] {
+ GUIUtil::copyEntryData(ui->banlistWidget, BanTableModel::Address, Qt::DisplayRole);
+ });
+ banTableContextMenu->addSeparator();
banTableContextMenu->addAction(tr("&Unban"), this, &RPCConsole::unbanSelectedNode);
connect(ui->banlistWidget, &QTableView::customContextMenuRequested, this, &RPCConsole::showBanTableContextMenu);