From 2c4a8198e8244eb7ce203a8124edd8a954cd4879 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Magiera?= Date: Mon, 10 Jun 2024 23:27:24 +0200 Subject: [PATCH] Fix WinningPoSt with remote sectors --- cmd/curio/tasks/tasks.go | 4 ++-- tasks/winning/winning_task.go | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/cmd/curio/tasks/tasks.go b/cmd/curio/tasks/tasks.go index 289a03a89..95d2e6d18 100644 --- a/cmd/curio/tasks/tasks.go +++ b/cmd/curio/tasks/tasks.go @@ -136,8 +136,8 @@ func StartTasks(ctx context.Context, dependencies *deps.Deps) (*harmonytask.Task } if cfg.Subsystems.EnableWinningPost { - pl := dependencies.LocalStore - winPoStTask := winning.NewWinPostTask(cfg.Subsystems.WinningPostMaxTasks, db, pl, verif, asyncParams(), full, maddrs) + store := dependencies.Stor + winPoStTask := winning.NewWinPostTask(cfg.Subsystems.WinningPostMaxTasks, db, store, verif, asyncParams(), full, maddrs) inclCkTask := winning.NewInclusionCheckTask(db, full) activeTasks = append(activeTasks, winPoStTask, inclCkTask) } diff --git a/tasks/winning/winning_task.go b/tasks/winning/winning_task.go index 1bbbd891a..23af71b5e 100644 --- a/tasks/winning/winning_task.go +++ b/tasks/winning/winning_task.go @@ -43,7 +43,7 @@ type WinPostTask struct { max int db *harmonydb.DB - paths *paths.Local + paths *paths.Remote verifier storiface.Verifier paramsReady func() (bool, error) @@ -72,11 +72,11 @@ type WinPostAPI interface { WalletSign(context.Context, address.Address, []byte) (*crypto.Signature, error) } -func NewWinPostTask(max int, db *harmonydb.DB, pl *paths.Local, verifier storiface.Verifier, paramck func() (bool, error), api WinPostAPI, actors map[dtypes.MinerAddress]bool) *WinPostTask { +func NewWinPostTask(max int, db *harmonydb.DB, remote *paths.Remote, verifier storiface.Verifier, paramck func() (bool, error), api WinPostAPI, actors map[dtypes.MinerAddress]bool) *WinPostTask { t := &WinPostTask{ max: max, db: db, - paths: pl, + paths: remote, verifier: verifier, paramsReady: paramck, api: api, @@ -455,10 +455,10 @@ func (t *WinPostTask) generateWinningPost( eg.Go(func() error { vanilla, err := t.paths.GenerateSingleVanillaProof(ctx, mid, s, ppt) if err != nil { - return xerrors.Errorf("get winning sector:%d,vanila failed: %w", s.SectorNumber, err) + return xerrors.Errorf("get winning sector:%d, vanilla failed: %w", s.SectorNumber, err) } if vanilla == nil { - return xerrors.Errorf("get winning sector:%d,vanila is nil", s.SectorNumber) + return xerrors.Errorf("get winning sector:%d, vanilla is nil", s.SectorNumber) } vproofs[i] = vanilla return nil