mirror of
https://github.com/Chia-Network/chia-blockchain.git
synced 2026-09-24 07:25:03 -05:00
Timlord updates state immediately, prevents race condition (#1271)
This commit is contained in:
@@ -298,7 +298,7 @@ def _get_next_difficulty(
|
||||
"""
|
||||
next_height: uint32 = uint32(height + 1)
|
||||
|
||||
if next_height < constants.EPOCH_BLOCKS:
|
||||
if next_height < (constants.EPOCH_BLOCKS - 3 * constants.MAX_SUB_SLOT_BLOCKS):
|
||||
# We are in the first epoch
|
||||
return uint64(constants.DIFFICULTY_STARTING)
|
||||
|
||||
|
||||
@@ -706,6 +706,8 @@ class Timelord:
|
||||
self.overflow_blocks = []
|
||||
self.new_subslot_end = eos_bundle
|
||||
|
||||
await self._handle_subslot_end()
|
||||
|
||||
async def _handle_failures(self):
|
||||
while len(self.vdf_failures) > 0:
|
||||
log.error(f"Vdf clients failed {self.vdf_failures_count} times.")
|
||||
|
||||
Reference in New Issue
Block a user