This commit is contained in:
Lex Berezhny 2020-07-27 11:52:24 -04:00
parent dbc0da2817
commit a1f3254261

View file

@ -812,7 +812,8 @@ class EventGenerator:
}
}
def blocks_main_finish(self):
@staticmethod
def blocks_main_finish():
yield {
"event": "blockchain.sync.blocks.main",
"data": {"id": 0, "done": (-1, -1)}
@ -822,7 +823,8 @@ class EventGenerator:
for file in files:
yield from self.blocks_file(*file)
def blocks_file(self, file, blocks, txs, steps):
@staticmethod
def blocks_file(file, blocks, txs, steps):
for i, step in enumerate(steps):
if i == 0:
yield {
@ -864,7 +866,8 @@ class EventGenerator:
"units": ("claims",)}
}
def claims_main_finish(self):
@staticmethod
def claims_main_finish():
yield {
"event": "blockchain.sync.claims.main",
"data": {"id": 0, "done": (-1,)}
@ -907,7 +910,8 @@ class EventGenerator:
}
}
def supports_main_finish(self):
@staticmethod
def supports_main_finish():
yield {
"event": "blockchain.sync.supports.main",
"data": {"id": 0, "done": (-1,)}
@ -926,7 +930,8 @@ class EventGenerator:
"blockchain.sync.supports.vacuum", ("steps",), 0, None, (1,), (1,)
)
def generate(self, name, units, eid, label, total, steps):
@staticmethod
def generate(name, units, eid, label, total, steps):
done = (0,)*len(total)
while not all(d >= t for d, t in zip(done, total)):
if done[0] == 0: