Merge pull request #11321 from filecoin-project/asr/tweak-equivocation

feat: miner: defensive check for equivocation
This commit is contained in:
Aayush Rajasekaran 2023-10-11 12:29:29 -04:00 committed by GitHub
commit 2b367225e4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -594,7 +594,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) refreshedBase, err := types.NewTipSet(refreshedBaseBlocks)
if err != nil { if err != nil {
err = xerrors.Errorf("failed to create new tipset when refreshing: %w", err) err = xerrors.Errorf("failed to create new tipset when refreshing: %w", err)