From e7cd3f39ab14273c1b6f0329bc72f92bf9429e3b Mon Sep 17 00:00:00 2001
From: Jeffrey Wigger <jeffrey.wigger@epfl.ch>
Date: Tue, 14 Jun 2022 03:11:19 +0200
Subject: [PATCH] run reddit dynamic jwins 3

---
 src/decentralizepy/communication/TCPRandomWalkRouting.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/decentralizepy/communication/TCPRandomWalkRouting.py b/src/decentralizepy/communication/TCPRandomWalkRouting.py
index 1433420..8380840 100644
--- a/src/decentralizepy/communication/TCPRandomWalkRouting.py
+++ b/src/decentralizepy/communication/TCPRandomWalkRouting.py
@@ -721,6 +721,7 @@ class TCPRandomWalkRoutingInternal(TCPRandomWalkBase):
             logging.info("Sent data of size: {}".format(data_size))
 
         logging.debug("send: rw? {}".format(data.get("rw", False)))
+        data_copy = data.copy()
         to_send = self.encrypt(data)
         if uid == "rw" and data.get("rw", False):
             # a rw message, they are shots into the blind, we need not track them,
@@ -740,7 +741,7 @@ class TCPRandomWalkRoutingInternal(TCPRandomWalkBase):
                 return
         elif type(uid) == tuple and uid[0] == "all":
             assert uid[1] == self.current_round
-            self.current_data = data
+            self.current_data = data_copy
             logging.debug(f"Sending to all neighbors {self.current_neighbors}")
             for n in self.current_neighbors:
                 send(n, to_send)
-- 
GitLab