autopilot: fix deprecation warning for dns.resolver.query

This commit is contained in:
Michael Schmoock
2022-02-21 12:56:16 +01:00
parent 43317e0901
commit 8d6248573d

View File

@@ -28,7 +28,7 @@ class CLightning_autopilot(Autopilot):
retrieve the nodeids of the ln seed nodes from lseed.bitcoinstats.com
"""
domain = "lseed.bitcoinstats.com"
srv_records = dns.resolver.query(domain, "SRV")
srv_records = dns.resolver.resolve(domain, "SRV")
res = []
for srv in srv_records:
bech32 = str(srv.target).rstrip(".").split(".")[0]