patch for bug that caused bootstrapping to never finish

This commit is contained in:
Dan Laine 2020-06-17 19:42:11 -04:00
parent 3aa89c3926
commit 4da1ce58fb
2 changed files with 6 additions and 0 deletions

View File

@ -107,6 +107,9 @@ func (b *bootstrapper) fetch(vtxID ids.ID) error {
// Make sure we don't already have this vertex
if _, err := b.State.GetVertex(vtxID); err == nil {
if numPending := b.outstandingRequests.Len(); numPending == 0 && b.processedStartingAcceptedFrontier {
return b.finish()
}
return nil
}

View File

@ -115,6 +115,9 @@ func (b *bootstrapper) fetch(blkID ids.ID) error {
// Make sure we don't already have this block
if _, err := b.VM.GetBlock(blkID); err == nil {
if numPending := b.outstandingRequests.Len(); numPending == 0 && b.processedStartingAcceptedFrontier {
return b.finish()
}
return nil
}