fix null incrementing

This commit is contained in:
Jeromy authored and Łukasz Magiera committed 2020-06-12 02:28:17 +02:00
1 parent 5469df7dd1
commit c7e3a5cff4
1 file changed
+2 -3
+2 -3
View File
@@ -188,6 +188,8 @@ func (m *Miner) mine(ctx context.Context) {
log.Errorf("failed to submit newly mined block: %s", err)
}
} else {
base.NullRounds++
// Wait until the next epoch, plus the propagation delay, so a new tipset
// has enough time to form.
//
@@ -261,7 +263,6 @@ func (m *Miner) mineOne(ctx context.Context, base *MiningBase) (*types.BlockMsg,
return nil, xerrors.Errorf("failed to get mining base info: %w", err)
}
if mbi == nil {
base.NullRounds++
return nil, nil
}
@@ -278,7 +279,6 @@ func (m *Miner) mineOne(ctx context.Context, base *MiningBase) (*types.BlockMsg,
}
if !hasPower {
// slashed or just have no power yet
base.NullRounds++
return nil, nil
}
@@ -302,7 +302,6 @@ func (m *Miner) mineOne(ctx context.Context, base *MiningBase) (*types.BlockMsg,
}
if winner == nil {
base.NullRounds++
return nil, nil
}