Skip to content

Commit 1626599

Browse files
committed
add to rounds map
1 parent 4539f77 commit 1626599

File tree

2 files changed

+8
-12
lines changed

2 files changed

+8
-12
lines changed

epoch.go

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1456,21 +1456,15 @@ func (e *Epoch) createBlockFinalizedVerificationTask(finalizedBlock FinalizedBlo
14561456
return md.Digest
14571457
}
14581458

1459-
// store the block in rounds
1460-
if !e.storeProposal(block) {
1461-
e.Logger.Warn("Unable to store proposed block for the round", zap.Uint64("round", md.Round))
1462-
return md.Digest
1463-
// TODO: timeout
1464-
}
1465-
14661459
round, ok := e.rounds[block.BlockHeader().Round]
14671460
if !ok {
1468-
e.Logger.Warn("Unable to get proposed block for the round", zap.Uint64("round", md.Round))
1469-
return md.Digest
1461+
round := NewRound(block)
1462+
e.rounds[block.BlockHeader().Round] = round
1463+
round.fCert = &finalizedBlock.FCert
1464+
} else {
1465+
round.fCert = &finalizedBlock.FCert
14701466
}
1471-
1472-
round.fCert = &finalizedBlock.FCert
1473-
1467+
14741468
e.indexFinalizationCertificate(block, finalizedBlock.FCert)
14751469
err := e.processReplicationState()
14761470
if err != nil {

replication_test.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -537,6 +537,8 @@ func TestReplicationAfterNodeDisconnects(t *testing.T) {
537537
})
538538
}
539539
}
540+
541+
// testReplicationAfterNodeDisconnects(t, nodes, 1, 14)
540542
}
541543

542544
func testReplicationAfterNodeDisconnects(t *testing.T, nodes []simplex.NodeID, startDisconnect, endDisconnect uint64) {

0 commit comments

Comments
 (0)