Use continue instead of goto
This commit is contained in:
parent
a4ade158f4
commit
43323b2188
@ -171,7 +171,7 @@ minerLoop:
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
log.Errorf("failed to get best mining candidate: %s", err)
|
log.Errorf("failed to get best mining candidate: %s", err)
|
||||||
if !m.niceSleep(time.Second * 5) {
|
if !m.niceSleep(time.Second * 5) {
|
||||||
goto minerLoop
|
continue minerLoop
|
||||||
}
|
}
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
@ -203,7 +203,7 @@ minerLoop:
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
log.Errorf("failed getting beacon entry: %s", err)
|
log.Errorf("failed getting beacon entry: %s", err)
|
||||||
if !m.niceSleep(time.Second) {
|
if !m.niceSleep(time.Second) {
|
||||||
goto minerLoop
|
continue minerLoop
|
||||||
}
|
}
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
@ -214,7 +214,7 @@ minerLoop:
|
|||||||
if base.TipSet.Equals(lastBase.TipSet) && lastBase.NullRounds == base.NullRounds {
|
if base.TipSet.Equals(lastBase.TipSet) && lastBase.NullRounds == base.NullRounds {
|
||||||
log.Warnf("BestMiningCandidate from the previous round: %s (nulls:%d)", lastBase.TipSet.Cids(), lastBase.NullRounds)
|
log.Warnf("BestMiningCandidate from the previous round: %s (nulls:%d)", lastBase.TipSet.Cids(), lastBase.NullRounds)
|
||||||
if !m.niceSleep(time.Duration(build.BlockDelaySecs) * time.Second) {
|
if !m.niceSleep(time.Duration(build.BlockDelaySecs) * time.Second) {
|
||||||
goto minerLoop
|
continue minerLoop
|
||||||
}
|
}
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
@ -225,7 +225,7 @@ minerLoop:
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
log.Errorf("mining block failed: %+v", err)
|
log.Errorf("mining block failed: %+v", err)
|
||||||
if !m.niceSleep(time.Second) {
|
if !m.niceSleep(time.Second) {
|
||||||
goto minerLoop
|
continue minerLoop
|
||||||
}
|
}
|
||||||
onDone(false, 0, err)
|
onDone(false, 0, err)
|
||||||
continue
|
continue
|
||||||
|
Loading…
Reference in New Issue
Block a user