lpwindow: Fix build

This commit is contained in:
Łukasz Magiera 2023-10-27 18:22:39 +02:00
parent 2b405f433c
commit 3d40105fc3
2 changed files with 8 additions and 23 deletions

View File

@ -10,7 +10,6 @@ import (
"github.com/gin-contrib/pprof"
"github.com/gin-gonic/gin"
"github.com/ipfs/go-datastore/namespace"
"github.com/pkg/errors"
"github.com/urfave/cli/v2"
"go.opencensus.io/stats"
@ -19,8 +18,6 @@ import (
"github.com/filecoin-project/go-address"
"github.com/filecoin-project/go-jsonrpc/auth"
"github.com/filecoin-project/go-statestore"
"github.com/filecoin-project/lotus/api"
"github.com/filecoin-project/lotus/build"
lcli "github.com/filecoin-project/lotus/cli"
@ -254,24 +251,13 @@ var runCmd = &cli.Command{
return err
}
// todo fetch limit config
stor := paths.NewRemote(lstor, si, http.Header(sa), 10, &paths.DefaultPartialFileHandler{})
mds, err := lr.Datastore(ctx, "/metadata")
if err != nil {
return err
}
wsts := statestore.New(namespace.Wrap(mds, modules.WorkerCallsPrefix))
smsts := statestore.New(namespace.Wrap(mds, modules.ManagerWorkPrefix))
sealer, err := sealer.New(ctx, lstor, stor, lr, si, cfg.SealerConfig, config.ProvingConfig{}, wsts, smsts)
if err != nil {
return err
}
//ds, dsCloser, err := modules.DatastoreV2(ctx, false, lr)
if err != nil {
return err
}
//defer dsCloser()
// todo localWorker isn't the abstraction layer we want to use here, we probably want to go straight to ffiwrapper
// maybe with a lotus-provider specific abstraction. LocalWorker does persistent call tracking which we probably
// don't need (ehh.. maybe we do, the async callback system may actually work decently well with harmonytask)
lw := sealer.NewLocalWorker(sealer.WorkerConfig{}, stor, localStore, si, nil, nil)
var maddrs []dtypes.MinerAddress
for _, s := range cfg.Addresses.MinerAddresses {
@ -283,8 +269,8 @@ var runCmd = &cli.Command{
}
if cfg.Subsystems.EnableWindowPost {
wdPostTask, err := provider.WindowPostScheduler(ctx, cfg.Fees, cfg.Proving, full, sealer, verif, j,
as, maddrs, db, cfg.Subsystems.WindowPostMaxTasks)
wdPostTask, err := provider.WindowPostScheduler(ctx, cfg.Fees, cfg.Proving, full, verif, lw,
as, maddrs, db, stor, si)
if err != nil {
return err
}

View File

@ -375,8 +375,7 @@ func (t *WdPostTask) addTaskToDB(taskId harmonytask.TaskID, taskIdent wdTaskIden
sp_id,
proving_period_start,
deadline_index,
partition_index,
partition_index
) VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10 , $11, $12, $13, $14)`,
taskId,
taskIdent.Sp_id,