Skip to content

Commit

Permalink
feat: miner: defensive check for equivocation (#11328)
Browse files Browse the repository at this point in the history
  • Loading branch information
arajasek authored Oct 24, 2023
1 parent 4acf337 commit 991cc47
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion miner/miner.go
Original file line number Diff line number Diff line change
Expand Up @@ -592,7 +592,7 @@ func (m *Miner) mineOne(ctx context.Context, base *MiningBase) (minedBlock *type
}
}

if len(refreshedBaseBlocks) != len(base.TipSet.Blocks()) {
if len(refreshedBaseBlocks) != 0 && len(refreshedBaseBlocks) != len(base.TipSet.Blocks()) {
refreshedBase, err := types.NewTipSet(refreshedBaseBlocks)
if err != nil {
err = xerrors.Errorf("failed to create new tipset when refreshing: %w", err)
Expand Down

0 comments on commit 991cc47

Please sign in to comment.