From 066b419e16d8a04eb7b54590e864f95f99ce6d09 Mon Sep 17 00:00:00 2001 From: Peter Surda Date: Fri, 9 Feb 2018 00:49:08 +0100 Subject: [PATCH] Bugfixes - typo in dandelion - stealth ackdata fix for broadcasts and mailing lists --- src/bitmessageqt/__init__.py | 1 + src/class_objectProcessor.py | 8 +++++--- src/network/dandelion.py | 2 +- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/bitmessageqt/__init__.py b/src/bitmessageqt/__init__.py index 9fb5fb29..3230a803 100644 --- a/src/bitmessageqt/__init__.py +++ b/src/bitmessageqt/__init__.py @@ -2095,6 +2095,7 @@ class MyForm(settingsmixin.SMainWindow): # We don't actually need the ackdata for acknowledgement since # this is a broadcast message, but we can use it to update the # user interface when the POW is done generating. + streamNumber = decodeAddress(fromAddress)[2] ackdata = genAckPayload(streamNumber, 0) toAddress = str_broadcast_subscribers ripe = '' diff --git a/src/class_objectProcessor.py b/src/class_objectProcessor.py index addcb24b..6387f6a7 100644 --- a/src/class_objectProcessor.py +++ b/src/class_objectProcessor.py @@ -553,7 +553,9 @@ class objectProcessor(threading.Thread): message = time.strftime("%a, %Y-%m-%d %H:%M:%S UTC", time.gmtime( )) + ' Message ostensibly from ' + fromAddress + ':\n\n' + body fromAddress = toAddress # The fromAddress for the broadcast that we are about to send is the toAddress (my address) for the msg message we are currently processing. - # We don't actually need the ackdataForBroadcast for acknowledgement since this is a broadcast message but we can use it to update the user interface when the POW is done generating. + # We don't actually need the ackdata for acknowledgement since this is a broadcast message but we can use it to update the user interface when the POW is done generating. + streamNumber = decodeAddress(fromAddress)[2] + ackdata = genAckPayload(streamNumber, 0) toAddress = '[Broadcast subscribers]' ripe = '' @@ -568,7 +570,7 @@ class objectProcessor(threading.Thread): fromAddress, subject, message, - ackdataForBroadcast, + ackdata, int(time.time()), # sentTime (this doesn't change) int(time.time()), # lastActionTime 0, @@ -580,7 +582,7 @@ class objectProcessor(threading.Thread): helper_sent.insert(t) queues.UISignalQueue.put(('displayNewSentMessage', ( - toAddress, '[Broadcast subscribers]', fromAddress, subject, message, ackdataForBroadcast))) + toAddress, '[Broadcast subscribers]', fromAddress, subject, message, ackdata))) queues.workerQueue.put(('sendbroadcast', '')) # Don't send ACK if invalid, blacklisted senders, invisible messages, disabled or chan diff --git a/src/network/dandelion.py b/src/network/dandelion.py index 098a9a22..06ecca24 100644 --- a/src/network/dandelion.py +++ b/src/network/dandelion.py @@ -80,7 +80,7 @@ class Dandelion(): for k in (k for k, v in self.nodeMap.iteritems() if v is None): self.nodeMap[k] = connection for k, v in {k: v for k, v in self.hashMap.iteritems() if v.child is None}.iteritems(): - self.hashMap[k] = Stem(connection, v.stream, self.poissionTimeout()) + self.hashMap[k] = Stem(connection, v.stream, self.poissonTimeout()) invQueue.put((v.stream, k, v.child))