Merge remote-tracking branch 'origin/master' into feat/deal-batch-publish

This commit is contained in:
Łukasz Magiera
2021-02-02 18:21:14 +01:00
124 changed files with 3967 additions and 728 deletions
+8 -7
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
}
@@ -170,13 +165,19 @@ func (a *StateAPI) StateMinerDeadlines(ctx context.Context, m address.Address, t
out := make([]api.Deadline, deadlines)
if err := mas.ForEachDeadline(func(i uint64, dl miner.Deadline) error {
ps, err := dl.PostSubmissions()
ps, err := dl.PartitionsPoSted()
if err != nil {
return err
}
l, err := dl.DisputableProofCount()
if err != nil {
return err
}
out[i] = api.Deadline{
PostSubmissions: ps,
PostSubmissions: ps,
DisputableProofCount: l,
}
return nil
}); err != nil {