sql startup fix, better errors

This commit is contained in:
Andrew Jackson (Ajax) 2023-11-13 16:23:29 -06:00
parent fea289fd2d
commit c8c673435e
3 changed files with 7 additions and 4 deletions

View File

@ -168,7 +168,7 @@ func GetRawAPIMultiV2(ctx *cli.Context, ainfoCfg []string, version string) ([]Ht
var httpHeads []HttpHead var httpHeads []HttpHead
if len(ainfoCfg) == 0 { if len(ainfoCfg) == 0 {
return httpHeads, xerrors.Errorf("could not get API info: none configured. \nConsider getting base.toml with './lotus-provider config get base >base.toml' \nthen adding \n[APIs] \n FULLNODE_API_INFO = [\" result_from lotus auth api-info --perm=admin \"]\n and updating it with './lotus-provider config set base.toml'") return httpHeads, xerrors.Errorf("could not get API info: none configured. \nConsider getting base.toml with './lotus-provider config get base >/tmp/base.toml' \nthen adding \n[APIs] \n ChainApiInfo = [\" result_from lotus auth api-info --perm=admin \"]\n and updating it with './lotus-provider config set /tmp/base.toml'")
} }
for _, i := range ainfoCfg { for _, i := range ainfoCfg {
ainfo := ParseApiInfo(i) ainfo := ParseApiInfo(i)

View File

@ -204,7 +204,10 @@ var runCmd = &cli.Command{
sa, err := StorageAuth(cfg.Apis.StorageRPCSecret) sa, err := StorageAuth(cfg.Apis.StorageRPCSecret)
if err != nil { if err != nil {
return xerrors.Errorf("parsing Apis.StorageRPCSecret config: %w", err) return xerrors.Errorf(`'%w' while parsing the config toml's
[Apis]
StorageRPCSecret=%v
Get it from the JSON documents in ~/.lotus-miner/keystore called .PrivateKey`, err, cfg.Apis.StorageRPCSecret)
} }
al := alerting.NewAlertingSystem(j) al := alerting.NewAlertingSystem(j)

View File

@ -37,12 +37,12 @@ create table wdpost_proofs
create table wdpost_recovery_tasks create table wdpost_recovery_tasks
( (
task_id bigint not null task_id bigint not null
constraint wdpost_partition_tasks_pk constraint wdpost_recovery_tasks_pk
primary key, primary key,
sp_id bigint not null, sp_id bigint not null,
proving_period_start bigint not null, proving_period_start bigint not null,
deadline_index bigint not null, deadline_index bigint not null,
partition_index bigint not null, partition_index bigint not null,
constraint wdpost_partition_tasks_identity_key constraint wdpost_recovery_tasks_identity_key
unique (sp_id, proving_period_start, deadline_index, partition_index) unique (sp_id, proving_period_start, deadline_index, partition_index)
); );