miner debug where injectNulls != 0

This commit is contained in:
zgfzgf 2020-09-27 15:01:42 +08:00
parent 2c1d96bcaa
commit 7a14455ac8

View File

@ -211,6 +211,8 @@ minerLoop:
base = prebase
}
base.NullRounds += injectNulls // testing
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)
if !m.niceSleep(time.Duration(build.BlockDelaySecs) * time.Second) {
@ -219,8 +221,6 @@ minerLoop:
continue
}
base.NullRounds += injectNulls // testing
b, err := m.mineOne(ctx, base)
if err != nil {
log.Errorf("mining block failed: %+v", err)