Exemplo n.º 1
0
Arquivo: qrlnode.py Projeto: fanff/QRL
    def ban_peer(self, peer_obj):
        ip = peer_obj.peer_ip
        ban_time = ntp.getTime() + (config.user.ban_minutes * 60)
        banned_peers = self._get_banned_peers()
        banned_peers[ip] = ban_time

        self._update_banned_peers(banned_peers)
        logger.warning('Banned %s', peer_obj.peer_ip)
        peer_obj.loseConnection()
Exemplo n.º 2
0
    def ban_peer(self, peer_obj):
        # FIXME: Move to another class. Group peer banning there
        ip = peer_obj.peer_ip
        ban_time = ntp.getTime() + (config.user.ban_minutes * 60)
        banned_peers = self._get_banned_peers()
        banned_peers[ip] = ban_time

        self._update_banned_peers(banned_peers)
        logger.warning('Banned %s', peer_obj.peer_ip)
        peer_obj.loseConnection()
Exemplo n.º 3
0
 def ban_peer(self, peer_obj):
     self._banned_peers.add(peer_obj.addr_remote)
     logger.warning('Banned %s', peer_obj.addr_remote)
     peer_obj.loseConnection()