fix: [vanity] length > 5 clusters

dev
terrtia 2024-02-19 15:54:15 +01:00
parent 784579baef
commit 6fa8f6e0bc
No known key found for this signature in database
GPG Key ID: 1E1B1F50D84613D0
1 changed files with 1 additions and 3 deletions

View File

@ -679,13 +679,11 @@ def get_vanity_cluster(vanity, len_vanity=4, nb_min=4):
return get_vanity_clusters(nb_min=nb_min) return get_vanity_clusters(nb_min=nb_min)
else: else:
clusters = {} clusters = {}
print(vanity, len_vanity, get_vanity_domains(vanity[:4], len_vanity=4))
for domain in get_vanity_domains(vanity[:4], len_vanity=4): for domain in get_vanity_domains(vanity[:4], len_vanity=4):
new_vanity = get_domain_vanity(domain, len_vanity=len_vanity) new_vanity = get_domain_vanity(domain, len_vanity=len_vanity)
if vanity not in clusters: if new_vanity not in clusters:
clusters[new_vanity] = 0 clusters[new_vanity] = 0
clusters[new_vanity] += 1 clusters[new_vanity] += 1
print(clusters)
to_remove = [] to_remove = []
for new_vanity in clusters: for new_vanity in clusters:
if clusters[new_vanity] < nb_min: if clusters[new_vanity] < nb_min: