mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-01-19 06:43:45 +01:00
contrib: makeseeds: dedup by ip,port
Handle the multiple ports per IP case (as that's a criterion later).
This commit is contained in:
@@ -108,10 +108,10 @@ def parseline(line):
|
||||
}
|
||||
|
||||
def dedup(ips):
|
||||
'''deduplicate by address'''
|
||||
'''deduplicate by address,port'''
|
||||
d = {}
|
||||
for ip in ips:
|
||||
d[ip['ip']] = ip
|
||||
d[ip['ip'],ip['port']] = ip
|
||||
return list(d.values())
|
||||
|
||||
def filtermultiport(ips):
|
||||
|
||||
Reference in New Issue
Block a user