aboutsummaryrefslogtreecommitdiff
path: root/src/qt/bantablemodel.cpp
diff options
context:
space:
mode:
authorJonas Schnelli <jonas.schnelli@include7.ch>2015-07-03 08:35:14 +0200
committerJonas Schnelli <jonas.schnelli@include7.ch>2015-09-16 16:50:20 +0200
commitb1189cfa105da414d8645f7284c16a443a710cfe (patch)
tree622ece0d7c4eadc9e4feba954b5d6259c648fc3b /src/qt/bantablemodel.cpp
parent65abe91ce4c3c9b26afa5d1af38bd1bfe81546c4 (diff)
[Qt] adapt QT ban option to banlist.dat changes
Diffstat (limited to 'src/qt/bantablemodel.cpp')
-rw-r--r--src/qt/bantablemodel.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/qt/bantablemodel.cpp b/src/qt/bantablemodel.cpp
index 04840b0526..42542371ec 100644
--- a/src/qt/bantablemodel.cpp
+++ b/src/qt/bantablemodel.cpp
@@ -27,7 +27,7 @@ bool BannedNodeLessThan::operator()(const CCombinedBan& left, const CCombinedBan
case BanTableModel::Address:
return pLeft->subnet.ToString().compare(pRight->subnet.ToString()) < 0;
case BanTableModel::Bantime:
- return pLeft->bantil < pRight->bantil;
+ return pLeft->banEntry.nBanUntil < pRight->banEntry.nBanUntil;
}
return false;
@@ -47,18 +47,18 @@ public:
/** Pull a full list of banned nodes from CNode into our cache */
void refreshBanlist()
{
- std::map<CSubNet, int64_t> banMap;
+ banmap_t banMap;
CNode::GetBanned(banMap);
cachedBanlist.clear();
#if QT_VERSION >= 0x040700
cachedBanlist.reserve(banMap.size());
#endif
- foreach (const PAIRTYPE(CSubNet, int64_t)& banentry, banMap)
+ foreach (const PAIRTYPE(CSubNet, CBanEntry)& banentry, banMap)
{
CCombinedBan banEntry;
banEntry.subnet = banentry.first;
- banEntry.bantil = banentry.second;
+ banEntry.banEntry = banentry.second;
cachedBanlist.append(banEntry);
}
@@ -120,7 +120,7 @@ QVariant BanTableModel::data(const QModelIndex &index, int role) const
return QString::fromStdString(rec->subnet.ToString());
case Bantime:
QDateTime date = QDateTime::fromMSecsSinceEpoch(0);
- date = date.addSecs(rec->bantil);
+ date = date.addSecs(rec->banEntry.nBanUntil);
return date.toString(Qt::SystemLocaleLongDate);
}
}