From 991cc473f80bc957eeebb41f246a6a4f1b6a3845 Mon Sep 17 00:00:00 2001 From: Aayush Rajasekaran Date: Tue, 24 Oct 2023 13:16:48 -0400 Subject: [PATCH] feat: miner: defensive check for equivocation (#11328) --- miner/miner.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/miner/miner.go b/miner/miner.go index 5dc44930a43..39b1d195e2d 100644 --- a/miner/miner.go +++ b/miner/miner.go @@ -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)