Merge pull request #1189 from lbryio/faster-headers

magic
This commit is contained in:
Jack Robison 2018-05-04 11:10:43 -04:00 committed by GitHub
commit cc34c4b95f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -125,7 +125,7 @@ class Wallet(object):
s3_height = (len(raw_headers) / HEADER_SIZE) - 1 s3_height = (len(raw_headers) / HEADER_SIZE) - 1
local_height = self.local_header_file_height() local_height = self.local_header_file_height()
if s3_height > local_height: if s3_height > local_height:
with open(os.path.join(self.config.path, "blockchain_headers"), "w") as headers_file: with open(os.path.join(self.config.path, "blockchain_headers"), "wb") as headers_file:
headers_file.write(raw_headers) headers_file.write(raw_headers)
log.info("fetched headers from s3 (s3 height: %i)", s3_height) log.info("fetched headers from s3 (s3 height: %i)", s3_height)
else: else: