typos and fixes from code review
This commit is contained in:
parent
805bfbd18e
commit
fd04c607b2
2 changed files with 5 additions and 3 deletions
|
@ -98,8 +98,10 @@ class Wallet(object):
|
|||
response = yield treq.get(HEADERS_URL, headers=resume_header)
|
||||
got_406 = response.code == 406 # our file is bigger
|
||||
final_size_after_download = response.length + local_header_size
|
||||
if got_406:
|
||||
log.warning("s3 is more out of date than we are")
|
||||
# should have something to download and a final length divisible by the header size
|
||||
if not got_406 and final_size_after_download and not final_size_after_download % HEADER_SIZE:
|
||||
elif final_size_after_download and not final_size_after_download % HEADER_SIZE:
|
||||
s3_height = (final_size_after_download / HEADER_SIZE) - 1
|
||||
local_height = self.local_header_file_height()
|
||||
if s3_height > local_height:
|
||||
|
|
|
@ -18,7 +18,7 @@ from lbrynet import conf
|
|||
from util import debug_kademlia_packet
|
||||
|
||||
KB = 2**10
|
||||
PUBLIC_EXPOENT = 65537 # http://www.daemonology.net/blog/2009-06-11-cryptographic-right-answers.html
|
||||
PUBLIC_EXPONENT = 65537 # http://www.daemonology.net/blog/2009-06-11-cryptographic-right-answers.html
|
||||
|
||||
|
||||
def decode_rsa_key(pem_key):
|
||||
|
@ -162,7 +162,7 @@ class PointTraderKeyQueryHandler(object):
|
|||
|
||||
class Wallet(object):
|
||||
def __init__(self):
|
||||
self.private_key = rsa.generate_private_key(public_exponent=PUBLIC_EXPOENT,
|
||||
self.private_key = rsa.generate_private_key(public_exponent=PUBLIC_EXPONENT,
|
||||
key_size=1024, backend=default_backend())
|
||||
self.encoded_public_key = self.private_key.public_key().public_bytes(serialization.Encoding.PEM,
|
||||
serialization.PublicFormat.PKCS1)
|
||||
|
|
Loading…
Reference in a new issue