Skip to content

Commit

Permalink
Re-enables multi-failure test case in round robin (#6143)
Browse files Browse the repository at this point in the history
* re-enables multi-failure test case in round robin
  • Loading branch information
farazdagi committed Jun 5, 2020
1 parent 92f23df commit fd3cb0b
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 33 deletions.
2 changes: 1 addition & 1 deletion beacon-chain/sync/initial-sync/blocks_queue.go
Expand Up @@ -141,7 +141,7 @@ func (q *blocksQueue) loop() {
q.highestExpectedSlot = q.blocksFetcher.bestFinalizedSlot()
continue
}
log.Debug("Highest expected slot reached")
log.WithField("slot", q.highestExpectedSlot).Debug("Highest expected slot reached")
q.cancel()
}

Expand Down
62 changes: 30 additions & 32 deletions beacon-chain/sync/initial-sync/round_robin_test.go
Expand Up @@ -117,38 +117,36 @@ func TestRoundRobinSync(t *testing.T) {
},
},
},

// TODO(3147): Handle multiple failures.
//{
// name: "Multiple peers with multiple failures",
// currentSlot: 320, // 10 epochs
// expectedBlockSlots: makeSequence(1, 320),
// peers: []*peerData{
// {
// blocks: makeSequence(1, 320),
// finalizedEpoch: 4,
// headSlot: 320,
// },
// {
// blocks: makeSequence(1, 320),
// finalizedEpoch: 4,
// headSlot: 320,
// failureSlots: makeSequence(1, 320),
// },
// {
// blocks: makeSequence(1, 320),
// finalizedEpoch: 4,
// headSlot: 320,
// failureSlots: makeSequence(1, 320),
// },
// {
// blocks: makeSequence(1, 320),
// finalizedEpoch: 4,
// headSlot: 320,
// failureSlots: makeSequence(1, 320),
// },
// },
//},
{
name: "Multiple peers with multiple failures",
currentSlot: 320, // 10 epochs
expectedBlockSlots: makeSequence(1, 320),
peers: []*peerData{
{
blocks: makeSequence(1, 320),
finalizedEpoch: 9,
headSlot: 320,
},
{
blocks: makeSequence(1, 320),
finalizedEpoch: 9,
headSlot: 320,
failureSlots: makeSequence(1, 320),
},
{
blocks: makeSequence(1, 320),
finalizedEpoch: 9,
headSlot: 320,
failureSlots: makeSequence(1, 320),
},
{
blocks: makeSequence(1, 320),
finalizedEpoch: 9,
headSlot: 320,
failureSlots: makeSequence(1, 320),
},
},
},
{
name: "Multiple peers with different finalized epoch",
currentSlot: 320, // 10 epochs
Expand Down

0 comments on commit fd3cb0b

Please sign in to comment.