Merge pull request #2850 from wakiyamap/fix_download_bcheaders
Fix download failed blockchain headers
This commit is contained in:
commit
afa1a4d22a
|
@ -982,10 +982,10 @@ class Network(util.DaemonThread):
|
|||
filename = b.path()
|
||||
def download_thread():
|
||||
try:
|
||||
import urllib, socket
|
||||
import urllib.request, socket
|
||||
socket.setdefaulttimeout(30)
|
||||
self.print_error("downloading ", bitcoin.HEADERS_URL)
|
||||
urllib.urlretrieve(bitcoin.HEADERS_URL, filename + '.tmp')
|
||||
urllib.request.urlretrieve(bitcoin.HEADERS_URL, filename + '.tmp')
|
||||
os.rename(filename + '.tmp', filename)
|
||||
self.print_error("done.")
|
||||
except Exception:
|
||||
|
|
Loading…
Reference in New Issue