From 73db6bbf17b0319c2db821b5e481c4d00f6c3e74 Mon Sep 17 00:00:00 2001 From: Jonathan Warren Date: Sat, 30 Mar 2013 18:32:30 -0400 Subject: [PATCH] better debug messages --- bitmessagemain.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/bitmessagemain.py b/bitmessagemain.py index e280b868..08525254 100755 --- a/bitmessagemain.py +++ b/bitmessagemain.py @@ -379,16 +379,16 @@ class receiveDataThread(QThread): del self.objectsThatWeHaveYetToCheckAndSeeWhetherWeAlreadyHave[objectHash] #It is possible that the remote node doesn't respond with the object. In that case, we'll very likely get it from someone else anyway. if len(self.objectsThatWeHaveYetToCheckAndSeeWhetherWeAlreadyHave) == 0: printLock.acquire() - print 'within processData, number of objectsThatWeHaveYetToCheckAndSeeWhetherWeAlreadyHave is now', len(self.objectsThatWeHaveYetToCheckAndSeeWhetherWeAlreadyHave) + print '(concerning', self.HOST + ')', 'number of objectsThatWeHaveYetToCheckAndSeeWhetherWeAlreadyHave is now', len(self.objectsThatWeHaveYetToCheckAndSeeWhetherWeAlreadyHave) printLock.release() break if len(self.objectsThatWeHaveYetToCheckAndSeeWhetherWeAlreadyHave) == 0: printLock.acquire() - print 'within processData, number of objectsThatWeHaveYetToCheckAndSeeWhetherWeAlreadyHave is now', len(self.objectsThatWeHaveYetToCheckAndSeeWhetherWeAlreadyHave) + print '(concerning', self.HOST + ')', 'number of objectsThatWeHaveYetToCheckAndSeeWhetherWeAlreadyHave is now', len(self.objectsThatWeHaveYetToCheckAndSeeWhetherWeAlreadyHave) printLock.release() if len(self.objectsThatWeHaveYetToCheckAndSeeWhetherWeAlreadyHave) > 0: printLock.acquire() - print 'within processData, number of objectsThatWeHaveYetToCheckAndSeeWhetherWeAlreadyHave is now', len(self.objectsThatWeHaveYetToCheckAndSeeWhetherWeAlreadyHave) + print '(concerning', self.HOST + ')', 'number of objectsThatWeHaveYetToCheckAndSeeWhetherWeAlreadyHave is now', len(self.objectsThatWeHaveYetToCheckAndSeeWhetherWeAlreadyHave) printLock.release() if len(self.ackDataThatWeHaveYetToSend) > 0: self.data = self.ackDataThatWeHaveYetToSend.pop() @@ -1217,6 +1217,7 @@ class receiveDataThread(QThread): print 'inv message doesn\'t contain enough data. Ignoring.' return if numberOfItemsInInv == 1: #we'll just request this data from the person who advertised the object. + self.objectsOfWhichThisRemoteNodeIsAlreadyAware[data[lengthOfVarint:32+lengthOfVarint]] = 0 if data[lengthOfVarint:32+lengthOfVarint] in inventory: printLock.acquire() print 'Inventory (in memory) has inventory item already.'