Sync ForgerCommitment and use it in coord

Previously the coordinator was erroneously using Slot.BatchesLen to determine
when anyone can forge.  The correct behaviour is implmenented with the boolean
flag `ForgerCommitment`, that is set to true only when there's a batch before
the deadline within a slot.

Delete Slot.BatchesLen, and the synchronization code of this value from the
Synchronizer, as this is not needed
This commit is contained in:
Eduard S
2020-12-23 14:37:30 +01:00
parent cd6eb44c16
commit 8267d007c9
11 changed files with 303 additions and 55 deletions

View File

@@ -47,7 +47,7 @@ type BatchInfo struct {
// DebugStore is a debug function to store the BatchInfo as a json text file in
// storePath
func (b *BatchInfo) DebugStore(storePath string) error {
batchJSON, err := json.Marshal(b)
batchJSON, err := json.MarshalIndent(b, "", " ")
if err != nil {
return tracerr.Wrap(err)
}