aboutsummaryrefslogtreecommitdiff
path: root/contrib/seeds/makeseeds.py
diff options
context:
space:
mode:
authorlaanwj <126646+laanwj@users.noreply.github.com>2022-04-15 14:08:38 +0200
committerlaanwj <126646+laanwj@users.noreply.github.com>2022-04-15 14:12:15 +0200
commit2f629f80896697e458b47a8335744a11b4f33587 (patch)
treed59838fcf3274fb69c653f6030d144046aa5785d /contrib/seeds/makeseeds.py
parentf3e0ace8ecd84009a23da6b0de47f01d79c45772 (diff)
downloadbitcoin-2f629f80896697e458b47a8335744a11b4f33587.tar.xz
contrib: Remove suspicious hosts list from makeseeds
I have some qualms with maintaining a suspicious hosts list as part as the repository. But also, it's stale and irrelevant. I've checked the entire list and none of them is connectable. Only one still appars in `nodes_main.txt` but with low uptime and an old subversion string so it wouldn't be picked in the first place.
Diffstat (limited to 'contrib/seeds/makeseeds.py')
-rwxr-xr-xcontrib/seeds/makeseeds.py9
1 files changed, 0 insertions, 9 deletions
diff --git a/contrib/seeds/makeseeds.py b/contrib/seeds/makeseeds.py
index 4382b7d258..78eb04a836 100755
--- a/contrib/seeds/makeseeds.py
+++ b/contrib/seeds/makeseeds.py
@@ -21,12 +21,6 @@ MAX_SEEDS_PER_ASN = {
MIN_BLOCKS = 730000
-# These are hosts that have been observed to be behaving strangely (e.g.
-# aggressively connecting to every node).
-with open("suspicious_hosts.txt", mode="r", encoding="utf-8") as f:
- SUSPICIOUS_HOSTS = {s.strip() for s in f if s.strip()}
-
-
PATTERN_IPV4 = re.compile(r"^((\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})):(\d+)$")
PATTERN_IPV6 = re.compile(r"^\[([0-9a-z:]+)\]:(\d+)$")
PATTERN_ONION = re.compile(r"^([a-z2-7]{56}\.onion):(\d+)$")
@@ -213,9 +207,6 @@ def main():
# Skip duplicates (in case multiple seeds files were concatenated)
ips = dedup(ips)
print(f'{ip_stats(ips):s} After removing duplicates', file=sys.stderr)
- # Skip entries from suspicious hosts.
- ips = [ip for ip in ips if ip['ip'] not in SUSPICIOUS_HOSTS]
- print(f'{ip_stats(ips):s} Skip entries from suspicious hosts', file=sys.stderr)
# Enforce minimal number of blocks.
ips = [ip for ip in ips if ip['blocks'] >= MIN_BLOCKS]
print(f'{ip_stats(ips):s} Enforce minimal number of blocks', file=sys.stderr)