Actors update: MinerInfo.SealProofType has been removed

This commit is contained in:
Aayush Rajasekaran
2021-01-21 15:21:19 -08:00
committed by Steven Allen
parent 82635f2515
commit ab90a3b2bc
12 changed files with 50 additions and 36 deletions
-5
View File
@@ -140,15 +140,10 @@ func (m *StateModule) StateMinerInfo(ctx context.Context, actor address.Address,
return miner.MinerInfo{}, xerrors.Errorf("failed to load miner actor state: %w", err)
}
// TODO: You know, this is terrible.
// I mean, we _really_ shouldn't do this. Maybe we should convert somewhere else?
info, err := mas.Info()
if err != nil {
return miner.MinerInfo{}, err
}
if m.StateManager.GetNtwkVersion(ctx, ts.Height()) >= network.Version7 && info.SealProofType < abi.RegisteredSealProof_StackedDrg2KiBV1_1 {
info.SealProofType += abi.RegisteredSealProof_StackedDrg2KiBV1_1
}
return info, nil
}