don't try to make workers run if they aren't in ready state

This commit is contained in:
Cassandra Heart 2024-11-22 01:52:36 -06:00
parent ca5d0579ea
commit f2a3bd2d8e
No known key found for this signature in database
GPG Key ID: 6352152859385958
2 changed files with 4 additions and 1 deletions

View File

@ -563,6 +563,9 @@ func (e *DataClockConsensusEngine) PerformTimeProof(
})
}
}
if len(actives) < 3 {
return []mt.DataBlock{}
}
output := make([]mt.DataBlock, len(actives))
e.logger.Info(
"creating data shard ring proof",

View File

@ -292,7 +292,7 @@ func (e *DataClockConsensusEngine) processFrame(
outputs := e.PerformTimeProof(latestFrame, latestFrame.Difficulty, ring)
if outputs == nil || len(outputs) < 3 {
e.logger.Error("could not successfully build proof, reattempting")
e.logger.Info("workers not yet available for proving")
return latestFrame
}
modulo := len(outputs)