use float for random delay

This commit is contained in:
Youngjoon Lee 2024-05-16 16:04:18 +09:00
parent e1850865a5
commit 3cb7ba1c18
No known key found for this signature in database
GPG Key ID: 09B750B5BD6F08A2

View File

@ -89,7 +89,7 @@ class Node:
self.log("Dropping a cover message: %s" % msg.payload)
else:
# TODO: use Poisson delay or something else
yield self.env.timeout(random.randint(0, 5))
yield self.env.timeout(random.uniform(0, 5.0))
self.env.process(self.p2p.broadcast(self, msg))
else:
self.log("Receiving SphinxPacket, but not mine")