make all nodes emit messages

This commit is contained in:
Youngjoon Lee 2024-05-13 09:00:01 +09:00
parent f46d343ea6
commit 76b3cb0547
No known key found for this signature in database
GPG Key ID: 09B750B5BD6F08A2

View File

@ -23,8 +23,7 @@ class Node:
"""
Creates/encapsulate a message and send it to the network through the mixnet
"""
# while True:
if self.id == 0:
while True:
msg = self.create_message()
yield self.env.timeout(2)
print("Sending a message at time %d" % self.env.now)