Compute post more than once
This commit is contained in:
parent
42b8af302f
commit
6c48ab3be4
@ -445,6 +445,7 @@ func (sma StorageMinerActor) SubmitPoSt(act *types.Actor, vmctx types.VMContext,
|
||||
}
|
||||
|
||||
self.ProvingSet = self.Sectors
|
||||
self.ProvingPeriodEnd = nextProvingPeriodEnd
|
||||
self.NextDoneSet = params.DoneSet
|
||||
|
||||
c, err := vmctx.Storage().Put(self)
|
||||
|
@ -303,15 +303,20 @@ func (m *Miner) maybeDoPost(ctx context.Context, ts *types.TipSet) (<-chan error
|
||||
GasPrice: types.NewInt(1),
|
||||
}
|
||||
|
||||
_, err = m.api.MpoolPushMessage(ctx, msg)
|
||||
smsg, err := m.api.MpoolPushMessage(ctx, msg)
|
||||
if err != nil {
|
||||
ret <- xerrors.Errorf("pushing message to mpool: %w", err)
|
||||
return
|
||||
}
|
||||
|
||||
// make sure it succeeds...
|
||||
// m.api.ChainWaitMsg()
|
||||
_, err = m.api.ChainWaitMsg(ctx, smsg.Cid())
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
// TODO: check receipt
|
||||
|
||||
m.schedulePoSt(ctx, nil)
|
||||
}()
|
||||
|
||||
return ret, sourceTs.MinTicketBlock(), nil
|
||||
|
Loading…
Reference in New Issue
Block a user