Skip to content

Commit

Permalink
feat: miner: defensive check for equivocation
Browse files Browse the repository at this point in the history
  • Loading branch information
arajasek authored and Stebalien committed Oct 24, 2023
1 parent 4acf337 commit e1e1e02
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 e1e1e02

Please sign in to comment.