From 341cec8e59c74709bd40135cffda14a2e5300eaf Mon Sep 17 00:00:00 2001 From: Jonathan Warren Date: Mon, 11 Feb 2013 16:38:05 -0500 Subject: [PATCH 1/2] added comment --- bitmessagemain.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bitmessagemain.py b/bitmessagemain.py index ff173d3d..a9b62959 100644 --- a/bitmessagemain.py +++ b/bitmessagemain.py @@ -1439,7 +1439,7 @@ class receiveDataThread(QThread): printLock.release() inventoryHash = calculateInventoryHash(payload) objectType = 'pubkey' - inventory[inventoryHash] = (objectType, self.streamNumber, payload, timeEncodedInPubkey) + inventory[inventoryHash] = (objectType, self.streamNumber, payload, timeEncodedInPubkey)#If the time embedded in this pubkey is more than 3 days old then this object isn't going to last very long in the inventory- the cleanerThread is going to come along and move it from the inventory in memory to the SQL inventory and then delete it from the SQL inventory. It should still find its way back to the original requestor if he is online however. self.broadcastinv(inventoryHash) else: #the pubkey is not in our database of pubkeys. Let's check if the requested key is ours (which would mean we should do the POW, put it in the pubkey table, and broadcast out the pubkey.) if self.data[36+addressVersionLength+streamNumberLength:56+addressVersionLength+streamNumberLength] in myECAddressHashes: #if this address hash is one of mine From 2bbc08f0809964acf70438714d5ad379377e5e6a Mon Sep 17 00:00:00 2001 From: Jonathan Warren Date: Mon, 11 Feb 2013 17:01:35 -0500 Subject: [PATCH 2/2] The embedded time is needed. --- bitmessagemain.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bitmessagemain.py b/bitmessagemain.py index a9b62959..8240f795 100644 --- a/bitmessagemain.py +++ b/bitmessagemain.py @@ -1256,7 +1256,7 @@ class receiveDataThread(QThread): def processpubkey(self): readPosition = 24 #for the message header readPosition += 8 #for the nonce - #embeddedTime, = unpack('>I',self.data[readPosition:readPosition+4]) #We don't need the time in this processpubkey function. It was checked earlier in the recpubkey function. + embeddedTime, = unpack('>I',self.data[readPosition:readPosition+4]) readPosition += 4 #for the time addressVersion, varintLength = decodeVarint(self.data[readPosition:readPosition+10]) readPosition += varintLength