mirror of
https://github.com/logos-blockchain/logos-blockchain-specs.git
synced 2026-01-05 06:33:08 +00:00
fix: handling weight properly
This commit is contained in:
parent
a46dbfe826
commit
adcdc597bb
@ -55,7 +55,7 @@ class Node:
|
||||
|
||||
def real_message_prob(self):
|
||||
weight = self.config.mixnet.real_message_prob_weights[self.id] \
|
||||
if self.id < len(self.config.mixnet.real_message_prob_weights) else 0
|
||||
if self.id < len(self.config.mixnet.real_message_prob_weights) else 1
|
||||
return self.config.mixnet.real_message_prob * weight
|
||||
|
||||
def create_message(self, message_type: MessageType) -> SphinxPacket | bytes:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user