MCPcopy Create free account
hub / github.com/ElementsProject/elements / unbanSelectedNode

Method unbanSelectedNode

src/qt/rpcconsole.cpp:1309–1328  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1307}
1308
1309void RPCConsole::unbanSelectedNode()
1310{
1311 if (!clientModel)
1312 return;
1313
1314 // Get selected ban addresses
1315 QList<QModelIndex> nodes = GUIUtil::getEntryData(ui->banlistWidget, BanTableModel::Address);
1316 for(int i = 0; i < nodes.count(); i++)
1317 {
1318 // Get currently selected ban address
1319 QString strNode = nodes.at(i).data().toString();
1320 CSubNet possibleSubnet;
1321
1322 LookupSubNet(strNode.toStdString(), possibleSubnet);
1323 if (possibleSubnet.IsValid() && m_node.unban(possibleSubnet))
1324 {
1325 clientModel->getBanTableModel()->refresh();
1326 }
1327 }
1328}
1329
1330void RPCConsole::clearSelectedNode()
1331{

Callers

nothing calls this directly

Calls 8

getEntryDataFunction · 0.85
LookupSubNetFunction · 0.85
countMethod · 0.80
unbanMethod · 0.80
getBanTableModelMethod · 0.80
dataMethod · 0.45
IsValidMethod · 0.45
refreshMethod · 0.45

Tested by

no test coverage detected