polish logs

This commit is contained in:
Youngjoon Lee 2024-05-24 16:36:04 +09:00
parent 01d839a7a7
commit d5b126364b
No known key found for this signature in database
GPG Key ID: 09B750B5BD6F08A2
2 changed files with 2 additions and 2 deletions

View File

@ -126,7 +126,7 @@ class Node:
return tx == Node.create_incentive_tx(self.public_key)
def log(self, msg):
print(f"t={self.env.now}: Node:{self.id}: {msg}")
print(f"t={self.env.now:.3f}: Node:{self.id}: {msg}")
class MessageType(Enum):

View File

@ -51,7 +51,7 @@ class P2P(ABC):
self.adversary.observe_incoming_message(receiver)
def log(self, msg):
print(f"t={self.env.now}: P2P: {msg}")
print(f"t={self.env.now:.3f}: P2P: {msg}")
class NaiveBroadcastP2P(P2P):