Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
 into pending set
  • Loading branch information
ayeowch committed Mar 11, 2015
1 parent 3948038 commit 802f3b6
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions crawl.py
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,14 @@ def restart(timestamp):
(address, port, services) = key[5:].split("-", 2)
redis_pipe.sadd('pending', (address, int(port), int(services)))
redis_pipe.delete(key)

# Reachable nodes from https://getaddr.bitnodes.io/#join-the-network
checked_nodes = REDIS_CONN.zrangebyscore(
'check', timestamp - SETTINGS['max_age'], timestamp)
for node in checked_nodes:
(address, port, services) = eval(node)
redis_pipe.sadd('pending', (address, port, services))

redis_pipe.execute()

reachable_nodes = len(nodes)
Expand Down

0 comments on commit 802f3b6

Please sign in to comment.