mirror of https://github.com/poanetwork/gecko.git
patch for bug that caused bootstrapping to never finish
This commit is contained in:
parent
3aa89c3926
commit
4da1ce58fb
|
@ -107,6 +107,9 @@ func (b *bootstrapper) fetch(vtxID ids.ID) error {
|
||||||
|
|
||||||
// Make sure we don't already have this vertex
|
// Make sure we don't already have this vertex
|
||||||
if _, err := b.State.GetVertex(vtxID); err == nil {
|
if _, err := b.State.GetVertex(vtxID); err == nil {
|
||||||
|
if numPending := b.outstandingRequests.Len(); numPending == 0 && b.processedStartingAcceptedFrontier {
|
||||||
|
return b.finish()
|
||||||
|
}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -115,6 +115,9 @@ func (b *bootstrapper) fetch(blkID ids.ID) error {
|
||||||
|
|
||||||
// Make sure we don't already have this block
|
// Make sure we don't already have this block
|
||||||
if _, err := b.VM.GetBlock(blkID); err == nil {
|
if _, err := b.VM.GetBlock(blkID); err == nil {
|
||||||
|
if numPending := b.outstandingRequests.Len(); numPending == 0 && b.processedStartingAcceptedFrontier {
|
||||||
|
return b.finish()
|
||||||
|
}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue