We don't need multiple links per pool. This just makes it harder to generate dataset for downstream tools.
I've used this python script for this patch:
#!/usr/bin/env python3
import json
import glob
import sys
entity_files = glob.glob("pools/*.json")
addresses = dict()
tags = dict()
for file_path in entity_files:
with open(file_path, "r") as f:
e = json.load(f)
link = ""
if len(e["links"]) == 0:
print(f"No links for pool {e['name']}")
elif len(e["links"]) == 1:
link = e["links"][0]
elif len(e["links"]) > 1:
link = e["links"][0]
print(f"Using {link} for pool {e['name']} out of", e["links"])
content = {
"name": e["name"],
"addresses": sorted(e["addresses"]),
"tags": sorted(e["tags"]),
"link": link,
}
with open(file_path, "w") as out:
json.dump(content, out, indent=2, ensure_ascii=False)
out.write('\n')
It did output:
No links for pool tigerpool.net
No links for pool Helix
Using https://mybtccoin.com for pool myBTCcoin Pool out of ['https://mybtccoin.com', 'https://www.mybtccoin.com']
Using https://btc.top for pool BTC.TOP out of ['https://btc.top', 'https://www.btc.top']
No links for pool tiger
No links for pool SecretSuperstar
No links for pool ArkPool
Using https://www.bitarms.io for pool Bitfarms out of ['https://www.bitarms.io', 'https://www.bitfarms.io']
No links for pool BTCPool
Using https://sbicrypto.com for pool SBI Crypto out of ['https://sbicrypto.com', 'https://www.sbicrypto.com']
No links for pool BTPOOL
No links for pool CN/TT
Using https://btc.canoepool.com for pool CanoePool out of ['https://btc.canoepool.com', 'https://www.canoepool.com']
We don't need multiple links per pool. This just makes it harder to generate dataset for downstream tools.
I've used this python script for this patch:
It did output:
I've manually changed