sealing: Wire up context to batchers
This commit is contained in:
parent
c1529714e6
commit
1f914053b4
8
extern/storage-sealing/sealing.go
vendored
8
extern/storage-sealing/sealing.go
vendored
@ -131,7 +131,7 @@ type pendingPiece struct {
|
||||
accepted func(abi.SectorNumber, abi.UnpaddedPieceSize, error)
|
||||
}
|
||||
|
||||
func New(api SealingAPI, fc config.MinerFeeConfig, events Events, maddr address.Address, ds datastore.Batching, sealer sectorstorage.SectorManager, sc SectorIDCounter, verif ffiwrapper.Verifier, prov ffiwrapper.Prover, pcp PreCommitPolicy, gc GetSealingConfigFunc, notifee SectorStateNotifee, as AddrSel) *Sealing {
|
||||
func New(mctx context.Context, api SealingAPI, fc config.MinerFeeConfig, events Events, maddr address.Address, ds datastore.Batching, sealer sectorstorage.SectorManager, sc SectorIDCounter, verif ffiwrapper.Verifier, prov ffiwrapper.Prover, pcp PreCommitPolicy, gc GetSealingConfigFunc, notifee SectorStateNotifee, as AddrSel) *Sealing {
|
||||
s := &Sealing{
|
||||
api: api,
|
||||
feeCfg: fc,
|
||||
@ -152,9 +152,9 @@ func New(api SealingAPI, fc config.MinerFeeConfig, events Events, maddr address.
|
||||
notifee: notifee,
|
||||
addrSel: as,
|
||||
|
||||
terminator: NewTerminationBatcher(context.TODO(), maddr, api, as, fc, gc),
|
||||
precommiter: NewPreCommitBatcher(context.TODO(), maddr, api, as, fc, gc),
|
||||
commiter: NewCommitBatcher(context.TODO(), maddr, api, as, fc, gc, prov),
|
||||
terminator: NewTerminationBatcher(mctx, maddr, api, as, fc, gc),
|
||||
precommiter: NewPreCommitBatcher(mctx, maddr, api, as, fc, gc),
|
||||
commiter: NewCommitBatcher(mctx, maddr, api, as, fc, gc, prov),
|
||||
|
||||
getConfig: gc,
|
||||
dealInfo: &CurrentDealInfoManager{api},
|
||||
|
@ -157,7 +157,7 @@ func (m *Miner) Run(ctx context.Context) error {
|
||||
return m.addrSel.AddressFor(ctx, m.api, mi, use, goodFunds, minFunds)
|
||||
}
|
||||
|
||||
m.sealing = sealing.New(adaptedAPI, m.feeCfg, NewEventsAdapter(evts), m.maddr, m.ds, m.sealer, m.sc, m.verif, m.prover, &pcp, sealing.GetSealingConfigFunc(m.getSealConfig), m.handleSealingNotifications, as)
|
||||
m.sealing = sealing.New(ctx, adaptedAPI, m.feeCfg, NewEventsAdapter(evts), m.maddr, m.ds, m.sealer, m.sc, m.verif, m.prover, &pcp, sealing.GetSealingConfigFunc(m.getSealConfig), m.handleSealingNotifications, as)
|
||||
|
||||
go m.sealing.Run(ctx) //nolint:errcheck // logged intside the function
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user