From a480fd4f3d624a6abf83c94b917967b6a3afe014 Mon Sep 17 00:00:00 2001 From: Jonathan Warren Date: Wed, 1 Oct 2014 19:55:23 -0400 Subject: [PATCH] After upgrade period, also support old v2 addresses --- src/class_singleWorker.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/class_singleWorker.py b/src/class_singleWorker.py index 72e6bd69..6282f9eb 100644 --- a/src/class_singleWorker.py +++ b/src/class_singleWorker.py @@ -128,7 +128,6 @@ class singleWorker(threading.Thread): payload += pubEncryptionKey[1:] # Do the POW for this pubkey message - TTL = 2.5 * 24 * 60 * 60 # 2.5 days for now; user specifyable later. target = 2 ** 64 / (shared.networkDefaultProofOfWorkNonceTrialsPerByte*(len(payload) + 8 + shared.networkDefaultPayloadLengthExtraBytes + ((TTL*(len(payload)+8+shared.networkDefaultPayloadLengthExtraBytes))/(2 ** 16)))) print '(For pubkey message) Doing proof of work...' initialHash = hashlib.sha512(payload).digest() @@ -472,7 +471,6 @@ class singleWorker(threading.Thread): payload += highlevelcrypto.encrypt( dataToEncrypt, pubEncryptionKey.encode('hex')) - TTL = 2.5 * 24 * 60 * 60 # 2.5 days for now; user specifyable later. target = 2 ** 64 / (shared.networkDefaultProofOfWorkNonceTrialsPerByte*(len(payload) + 8 + shared.networkDefaultPayloadLengthExtraBytes + ((TTL*(len(payload)+8+shared.networkDefaultPayloadLengthExtraBytes))/(2 ** 16)))) print '(For broadcast message) Doing proof of work...' shared.UISignalQueue.put(('updateSentItemStatusByAckdata', ( @@ -790,7 +788,7 @@ class singleWorker(threading.Thread): if int(time.time()) < 1416175200: # Sun, 16 Nov 2014 22:00:00 GMT dataToSign = payload else: - dataToSign = encodeVarint(1) + encodeVarint(toStreamNumber) + payload + dataToSign = pack('>Q', embeddedTime) + '\x00\x00\x00\x02' + encodeVarint(1) + encodeVarint(toStreamNumber) + payload signature = highlevelcrypto.sign(dataToSign, privSigningKeyHex) payload += encodeVarint(len(signature)) payload += signature