From 64686d9bce45ca616c82bbf02a0faac32d6554cb Mon Sep 17 00:00:00 2001 From: LexLuthr Date: Tue, 7 May 2024 16:18:58 +0530 Subject: [PATCH] fix TreeRC --- curiosrc/seal/task_treed.go | 3 +++ curiosrc/seal/task_treerc.go | 6 +++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/curiosrc/seal/task_treed.go b/curiosrc/seal/task_treed.go index 7b31e12fb52..fda1d1f6558 100644 --- a/curiosrc/seal/task_treed.go +++ b/curiosrc/seal/task_treed.go @@ -32,6 +32,9 @@ type TreeDTask struct { } func (t *TreeDTask) CanAccept(ids []harmonytask.TaskID, engine *harmonytask.TaskEngine) (*harmonytask.TaskID, error) { + if isDevnet { + return &ids[0], nil + } if engine.Resources().Gpu > 0 { return &ids[0], nil } diff --git a/curiosrc/seal/task_treerc.go b/curiosrc/seal/task_treerc.go index 02cf0350e03..7584c47ac6b 100644 --- a/curiosrc/seal/task_treerc.go +++ b/curiosrc/seal/task_treerc.go @@ -153,13 +153,17 @@ func (t *TreeRCTask) TypeDetails() harmonytask.TaskTypeDetails { if isDevnet { ssize = abi.SectorSize(2 << 20) } + gpu := 1.0 + if isDevnet { + gpu = 0 + } return harmonytask.TaskTypeDetails{ Max: t.max, Name: "TreeRC", Cost: resources.Resources{ Cpu: 1, - Gpu: 1, + Gpu: gpu, Ram: 8 << 30, Storage: t.sc.Storage(t.taskToSector, storiface.FTSealed, storiface.FTCache, ssize, storiface.PathSealing, paths.MinFreeStoragePercentage), },