File indexing completed on 2025-01-05 04:37:21

0001 /*
0002     SPDX-FileCopyrightText: 2008 Joris Guisson <joris.guisson@gmail.com>
0003     SPDX-FileCopyrightText: 2008 Ivan Vasic <ivasic@gmail.com>
0004 
0005     SPDX-License-Identifier: GPL-2.0-or-later
0006 */
0007 #include "badpeerslist.h"
0008 #include <net/address.h>
0009 
0010 namespace bt
0011 {
0012 BadPeersList::BadPeersList()
0013 {
0014 }
0015 
0016 BadPeersList::~BadPeersList()
0017 {
0018 }
0019 
0020 bool BadPeersList::blocked(const net::Address &addr) const
0021 {
0022     return bad_peers.contains(addr.toString());
0023 }
0024 
0025 void BadPeersList::addBadPeer(const QString &ip)
0026 {
0027     bad_peers << ip;
0028 }
0029 
0030 }