genesis: set deals to end on sector expiry

Setting the deal to end on the sector expiry ensures we get the full
quality adjustment of power for the full sector.

Resolves #2404
This commit is contained in:
Travis Person 2020-07-19 22:38:52 +00:00
parent db92b99ec1
commit 28f7874942

View File

@ -146,6 +146,7 @@ func SetupStorageMiners(ctx context.Context, cs *store.ChainStore, sroot cid.Cid
params := &market.PublishStorageDealsParams{} params := &market.PublishStorageDealsParams{}
for _, preseal := range m.Sectors { for _, preseal := range m.Sectors {
preseal.Deal.VerifiedDeal = true preseal.Deal.VerifiedDeal = true
preseal.Deal.EndEpoch = minerInfos[i].presealExp
params.Deals = append(params.Deals, market.ClientDealProposal{ params.Deals = append(params.Deals, market.ClientDealProposal{
Proposal: preseal.Deal, Proposal: preseal.Deal,
ClientSignature: crypto.Signature{Type: crypto.SigTypeBLS}, // TODO: do we want to sign these? Or do we want to fake signatures for genesis setup? ClientSignature: crypto.Signature{Type: crypto.SigTypeBLS}, // TODO: do we want to sign these? Or do we want to fake signatures for genesis setup?