diff options
Diffstat (limited to 'src/qt/bantablemodel.cpp')
-rw-r--r-- | src/qt/bantablemodel.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/qt/bantablemodel.cpp b/src/qt/bantablemodel.cpp index 4f57cd4457..4592d29abc 100644 --- a/src/qt/bantablemodel.cpp +++ b/src/qt/bantablemodel.cpp @@ -43,7 +43,7 @@ public: /** Order (ascending or descending) to sort nodes by */ Qt::SortOrder sortOrder; - /** Pull a full list of banned nodes from CNode into our cache */ + /** Pull a full list of banned nodes from interfaces::Node into our cache */ void refreshBanlist(interfaces::Node& node) { banmap_t banMap; @@ -178,3 +178,9 @@ bool BanTableModel::shouldShow() { return priv->size() > 0; } + +bool BanTableModel::unban(const QModelIndex& index) +{ + CCombinedBan* ban{static_cast<CCombinedBan*>(index.internalPointer())}; + return ban != nullptr && m_node.unban(ban->subnet); +} |