diff --git a/deps/apiinfo.go b/deps/apiinfo.go index 1ac663ae0..2d14cca38 100644 --- a/deps/apiinfo.go +++ b/deps/apiinfo.go @@ -19,6 +19,7 @@ import ( "github.com/filecoin-project/curio/api" + lapi "github.com/filecoin-project/lotus/api" "github.com/filecoin-project/lotus/chain/types" cliutil "github.com/filecoin-project/lotus/cli/util" ) @@ -96,7 +97,7 @@ var RPCErrors = jsonrpc.NewErrors() func newChainNodeRPCV1(ctx context.Context, addr string, requestHeader http.Header, opts ...jsonrpc.Option) (api.Chain, jsonrpc.ClientCloser, error) { var res api.ChainStruct closer, err := jsonrpc.NewMergeClient(ctx, addr, "Filecoin", - api.GetInternalStructs(&res), requestHeader, append([]jsonrpc.Option{jsonrpc.WithErrors(RPCErrors)}, opts...)...) + api.GetInternalStructs(&res), requestHeader, append([]jsonrpc.Option{jsonrpc.WithErrors(lapi.RPCErrors)}, opts...)...) return &res, closer, err } diff --git a/tasks/f3/f3_task.go b/tasks/f3/f3_task.go index cce2ae6cf..d7c8f641c 100644 --- a/tasks/f3/f3_task.go +++ b/tasks/f3/f3_task.go @@ -255,8 +255,14 @@ func (f *F3Task) TypeDetails() harmonytask.TaskTypeDetails { func (f *F3Task) Adder(taskFunc harmonytask.AddTaskFunc) { for minerAddress := range f.actors { + mid, err := address.IDFromAddress(address.Address(minerAddress)) + if err != nil { + log.Errorw("failed to parse miner address", "miner", minerAddress, "error", err) + continue + } + taskFunc(func(id harmonytask.TaskID, tx *harmonydb.Tx) (shouldCommit bool, seriousError error) { - n, err := tx.Exec("INSERT INTO f3_tasks (sp_id, task_id) VALUES ($1, $2) ON CONFLICT DO NOTHING", minerAddress, id) + n, err := tx.Exec("INSERT INTO f3_tasks (sp_id, task_id) VALUES ($1, $2) ON CONFLICT DO NOTHING", mid, id) if err != nil { return false, err }