make more lint more happy hopefully
This commit is contained in:
parent
5161528399
commit
d746d6e6df
@ -465,10 +465,13 @@ func storageMinerInit(ctx context.Context, cctx *cli.Context, api v1api.FullNode
|
||||
wsts := statestore.New(namespace.Wrap(mds, modules.WorkerCallsPrefix))
|
||||
smsts := statestore.New(namespace.Wrap(mds, modules.ManagerWorkPrefix))
|
||||
|
||||
// TODO: run sector index init only for devnets. This is not needed for longer running networks
|
||||
harmonyDB, err := harmonydb.New([]string{"127.0.0.1"}, "yugabyte", "yugabyte", "yugabyte", "5433", "",
|
||||
func(s string) { logging.Logger("harmonydb").Error(s) })
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
// TODO: get this bool from miner init cmd line
|
||||
enableSectorIndexDB := true
|
||||
|
||||
si := paths.NewIndexProxy(nil, harmonyDB, enableSectorIndexDB)
|
||||
|
@ -474,7 +474,7 @@ func (dbi *DBIndex) StorageFindSector(ctx context.Context, s abi.SectorID, ft st
|
||||
ORDER BY stor.storage_id`,
|
||||
s.Miner, s.Number, fts)
|
||||
if err != nil {
|
||||
return nil, xerrors.Errorf("Finding sector storage from DB fails with err: ", err)
|
||||
return nil, xerrors.Errorf("Finding sector storage from DB fails with err: %v", err)
|
||||
}
|
||||
|
||||
for _, row := range rows {
|
||||
@ -557,7 +557,7 @@ func (dbi *DBIndex) StorageFindSector(ctx context.Context, s abi.SectorID, ft st
|
||||
and heartbeat_err is null`,
|
||||
spaceReq, SkippedHeartbeatThresh)
|
||||
if err != nil {
|
||||
return nil, xerrors.Errorf("Selecting allowfetch storage paths from DB fails err: ", err)
|
||||
return nil, xerrors.Errorf("Selecting allowfetch storage paths from DB fails err: %v", err)
|
||||
}
|
||||
|
||||
for _, row := range rows {
|
||||
@ -633,7 +633,7 @@ func (dbi *DBIndex) StorageInfo(ctx context.Context, id storiface.ID) (storiface
|
||||
"SELECT urls, weight, max_storage, can_seal, can_store, groups, allow_to, allow_types, deny_types "+
|
||||
"FROM StorageLocation WHERE storage_id=$1", string(id))
|
||||
if err != nil {
|
||||
return storiface.StorageInfo{}, xerrors.Errorf("StorageInfo query fails: ", err)
|
||||
return storiface.StorageInfo{}, xerrors.Errorf("StorageInfo query fails: %v", err)
|
||||
}
|
||||
|
||||
var sinfo storiface.StorageInfo
|
||||
|
Loading…
Reference in New Issue
Block a user