polish logs
This commit is contained in:
parent
01d839a7a7
commit
d5b126364b
|
@ -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):
|
||||
|
|
|
@ -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):
|
||||
|
|
Loading…
Reference in New Issue