示例#1
0
文件: qrlnode.py 项目: 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()
示例#2
0
文件: qrlnode.py 项目: kstuart/QRL
    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()
示例#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()