fix null incrementing
This commit is contained in:
parent
5469df7dd1
commit
c7e3a5cff4
@ -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
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user