mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-18 13:17:55 +02:00
Merge cddcd22ab3 into merged_master (Bitcoin PR #20288)
This commit is contained in:
commit
f455acefd6
2 changed files with 8 additions and 2 deletions
|
|
@ -16,6 +16,12 @@ The seeds compiled into the release are created from sipa's DNS seed data, like
|
|||
|
||||
## Dependencies
|
||||
|
||||
Ubuntu:
|
||||
Ubuntu, Debian:
|
||||
|
||||
sudo apt-get install python3-dnspython
|
||||
|
||||
and/or for other operating systems:
|
||||
|
||||
pip install dnspython
|
||||
|
||||
See https://dnspython.readthedocs.io/en/latest/installation.html for more information.
|
||||
|
|
|
|||
|
|
@ -136,7 +136,7 @@ def lookup_asn(net, ip):
|
|||
ipaddr = res.rstrip('.') # 2.0.0.1.4.8.6.0.b.0.0.2.0.0.2.3
|
||||
prefix = '.origin6'
|
||||
|
||||
asn = int([x.to_text() for x in dns.resolver.query('.'.join(
|
||||
asn = int([x.to_text() for x in dns.resolver.resolve('.'.join(
|
||||
reversed(ipaddr.split('.'))) + prefix + '.asn.cymru.com',
|
||||
'TXT').response.answer][0].split('\"')[1].split(' ')[0])
|
||||
return asn
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue