- typo in dandelion
- stealth ackdata fix for broadcasts and mailing lists
This commit is contained in:
Peter Šurda 2018-02-09 00:49:08 +01:00
parent bbb5e5d99b
commit 066b419e16
Signed by: PeterSurda
GPG Key ID: 0C5F50C0B5F37D87
3 changed files with 7 additions and 4 deletions

View File

@ -2095,6 +2095,7 @@ class MyForm(settingsmixin.SMainWindow):
# We don't actually need the ackdata for acknowledgement since # We don't actually need the ackdata for acknowledgement since
# this is a broadcast message, but we can use it to update the # this is a broadcast message, but we can use it to update the
# user interface when the POW is done generating. # user interface when the POW is done generating.
streamNumber = decodeAddress(fromAddress)[2]
ackdata = genAckPayload(streamNumber, 0) ackdata = genAckPayload(streamNumber, 0)
toAddress = str_broadcast_subscribers toAddress = str_broadcast_subscribers
ripe = '' ripe = ''

View File

@ -553,7 +553,9 @@ class objectProcessor(threading.Thread):
message = time.strftime("%a, %Y-%m-%d %H:%M:%S UTC", time.gmtime( message = time.strftime("%a, %Y-%m-%d %H:%M:%S UTC", time.gmtime(
)) + ' Message ostensibly from ' + fromAddress + ':\n\n' + body )) + ' 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. 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) ackdata = genAckPayload(streamNumber, 0)
toAddress = '[Broadcast subscribers]' toAddress = '[Broadcast subscribers]'
ripe = '' ripe = ''
@ -568,7 +570,7 @@ class objectProcessor(threading.Thread):
fromAddress, fromAddress,
subject, subject,
message, message,
ackdataForBroadcast, ackdata,
int(time.time()), # sentTime (this doesn't change) int(time.time()), # sentTime (this doesn't change)
int(time.time()), # lastActionTime int(time.time()), # lastActionTime
0, 0,
@ -580,7 +582,7 @@ class objectProcessor(threading.Thread):
helper_sent.insert(t) helper_sent.insert(t)
queues.UISignalQueue.put(('displayNewSentMessage', ( queues.UISignalQueue.put(('displayNewSentMessage', (
toAddress, '[Broadcast subscribers]', fromAddress, subject, message, ackdataForBroadcast))) toAddress, '[Broadcast subscribers]', fromAddress, subject, message, ackdata)))
queues.workerQueue.put(('sendbroadcast', '')) queues.workerQueue.put(('sendbroadcast', ''))
# Don't send ACK if invalid, blacklisted senders, invisible messages, disabled or chan # Don't send ACK if invalid, blacklisted senders, invisible messages, disabled or chan

View File

@ -80,7 +80,7 @@ class Dandelion():
for k in (k for k, v in self.nodeMap.iteritems() if v is None): for k in (k for k, v in self.nodeMap.iteritems() if v is None):
self.nodeMap[k] = connection self.nodeMap[k] = connection
for k, v in {k: v for k, v in self.hashMap.iteritems() if v.child is None}.iteritems(): 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)) invQueue.put((v.stream, k, v.child))