feat: miner: defensive check for equivocation
This commit is contained in:
parent
0787ff3bc3
commit
7778fc2473
@ -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)
|
||||||
|
Loading…
Reference in New Issue
Block a user