correctly pick the seal type based on the network version

Of course, we should really just run all of our tests post actors v2.
This commit is contained in:
Steven Allen
2021-01-21 15:21:20 -08:00
parent fb5f3c5703
commit 03cd3760bb
5 changed files with 54 additions and 17 deletions
+6 -1
View File
@@ -159,7 +159,12 @@ func (a *API) ClientStartDeal(ctx context.Context, params *api.StartDealParams)
dealStart = ts.Height() + abi.ChainEpoch(dealStartBufferHours*blocksPerHour) // TODO: Get this from storage ask
}
st, err := miner.PreferredSealProofTypeFromWindowPoStType(mi.WindowPoStProofType)
networkVersion, err := a.StateNetworkVersion(ctx, types.EmptyTSK)
if err != nil {
return nil, xerrors.Errorf("failed to get network version: %w", err)
}
st, err := miner.PreferredSealProofTypeFromWindowPoStType(networkVersion, mi.WindowPoStProofType)
if err != nil {
return nil, xerrors.Errorf("failed to get seal proof type: %w", err)
}