mirror of
https://github.com/status-im/das-research.git
synced 2025-02-23 20:08:14 +00:00
add repairOnTheFly parameter
Signed-off-by: Csaba Kiraly <csaba.kiraly@gmail.com>
This commit is contained in:
parent
f05c3cd233
commit
d0641e4568
@ -121,6 +121,7 @@ class Validator:
|
||||
# TODO: this should be a parameter
|
||||
self.bwUplink = 110 if not self.amIproposer else 2200 # approx. 10Mbps and 200Mbps
|
||||
|
||||
self.repairOnTheFly = True
|
||||
self.perNeighborQueue = False # queue incoming messages to outgoing connections on arrival (as typical GossipSub impl)
|
||||
self.perNodeQueue = False # keep a global queue of incoming messages for later sequential dispatch
|
||||
self.dumbRandomScheduler = False # dumb random scheduler
|
||||
@ -445,6 +446,7 @@ class Validator:
|
||||
|
||||
def restoreRows(self):
|
||||
"""It restores the rows assigned to the validator, that can be repaired."""
|
||||
if self.repairOnTheFly:
|
||||
for id in self.rowIDs:
|
||||
rep = self.block.repairRow(id)
|
||||
if (rep.any()):
|
||||
@ -458,6 +460,7 @@ class Validator:
|
||||
|
||||
def restoreColumns(self):
|
||||
"""It restores the columns assigned to the validator, that can be repaired."""
|
||||
if self.repairOnTheFly:
|
||||
for id in self.columnIDs:
|
||||
rep = self.block.repairColumn(id)
|
||||
if (rep.any()):
|
||||
|
Loading…
x
Reference in New Issue
Block a user