feat: miner: defensive check for equivocation (#11328)

This commit is contained in:
Aayush Rajasekaran
2023-10-24 10:16:48 -07:00
committed by GitHub
parent 4acf337e62
commit 991cc473f8
+1 -1
View File
@@ -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)