mirror of
https://github.com/dashpay/dash.git
synced 2024-12-24 19:42:46 +01:00
contrib: Update makeseeds.py (#3790)
* contrib: Update makeseeds.py The `dnspython` package complained about `dns.resolver.Resolver.query()` being deprecated and suggested to use `dns.resolver.Resolver.resolve()` instead. * contrib: Update dependency install instructions in seeds/README.md
This commit is contained in:
parent
69b36f9672
commit
c37193fa82
@ -17,4 +17,5 @@ that the list is as expected.
|
||||
|
||||
Ubuntu:
|
||||
|
||||
sudo apt-get install python3-dnspython
|
||||
sudo apt-get install python3-pip
|
||||
pip3 install dnspython
|
||||
|
@ -91,7 +91,7 @@ def filtermultipayoutaddress(mns):
|
||||
return [mn for mn in mns if len(hist[mn['state']['payoutAddress']]) == 1]
|
||||
|
||||
def resolveasn(resolver, ip):
|
||||
asn = int([x.to_text() for x in resolver.query('.'.join(reversed(ip.split('.'))) + '.origin.asn.cymru.com', 'TXT').response.answer][0].split('\"')[1].split(' ')[0])
|
||||
asn = int([x.to_text() for x in resolver.resolve('.'.join(reversed(ip.split('.'))) + '.origin.asn.cymru.com', 'TXT').response.answer][0].split('\"')[1].split(' ')[0])
|
||||
return asn
|
||||
|
||||
# Based on Greg Maxwell's seed_filter.py
|
||||
|
Loading…
Reference in New Issue
Block a user