From b68ced7b19ee129c7a71341df0bc46159053a2e9 Mon Sep 17 00:00:00 2001 From: Aayush Date: Tue, 22 Aug 2023 11:00:27 -0400 Subject: [PATCH] address review --- miner/miner.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/miner/miner.go b/miner/miner.go index be32d3927..9fc344e15 100644 --- a/miner/miner.go +++ b/miner/miner.go @@ -10,6 +10,7 @@ import ( "sync" "time" + "github.com/hashicorp/golang-lru/arc/v2" "github.com/ipfs/go-cid" logging "github.com/ipfs/go-log/v2" "go.opencensus.io/trace" @@ -577,7 +578,7 @@ func (m *Miner) mineOne(ctx context.Context, base *MiningBase) (minedBlock *type // If the base has changed, we take the _intersection_ of our old base and new base, // thus ejecting blocks from any equivocating miners, without taking any new blocks. - if !newBase.TipSet.Equals(base.TipSet) { + if newBase.TipSet.Height() == base.TipSet.Height() && !newBase.TipSet.Equals(base.TipSet) { newBaseMap := map[cid.Cid]struct{}{} for _, newBaseBlk := range newBase.TipSet.Cids() { newBaseMap[newBaseBlk] = struct{}{}