storage: Better errors when starting sectorStateLoop
This commit is contained in:
parent
d18179d347
commit
e3d1f5b362
@ -105,7 +105,7 @@ func (m *Miner) Run(ctx context.Context) error {
|
||||
|
||||
go fps.run(ctx)
|
||||
if err := m.sectorStateLoop(ctx); err != nil {
|
||||
log.Error(err)
|
||||
log.Errorf("%+v", err)
|
||||
return xerrors.Errorf("failed to startup sector state loop: %w", err)
|
||||
}
|
||||
|
||||
|
@ -65,7 +65,7 @@ func (m *Miner) UpdateSectorState(ctx context.Context, sector uint64, snonce uin
|
||||
func (m *Miner) sectorStateLoop(ctx context.Context) error {
|
||||
trackedSectors, err := m.ListSectors()
|
||||
if err != nil {
|
||||
return err
|
||||
return xerrors.Errorf("loading sector list: %w", err)
|
||||
}
|
||||
|
||||
go func() {
|
||||
@ -100,7 +100,7 @@ func (m *Miner) sectorStateLoop(ctx context.Context) error {
|
||||
|
||||
ps, err := m.api.StateMinerProvingSet(ctx, m.maddr, curTs)
|
||||
if err != nil {
|
||||
return err
|
||||
return xerrors.Errorf("getting miner proving set: %w", err)
|
||||
}
|
||||
for _, ocs := range ps {
|
||||
if _, ok := trackedByID[ocs.SectorID]; ok {
|
||||
|
Loading…
Reference in New Issue
Block a user