Conversation
} else if !exists { | ||
return xc.ErrNotFound.Wrapf("sector %d not a member of partition %d, deadline %d", sector, pIdx, dlIdx) | ||
return false, xc.ErrNotFound.Wrapf("sector %d not a member of partition %d, deadline %d", sector, pIdx, dlIdx) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
treating a wrong location here as an error failure, agree?
Codecov Report
@@ Coverage Diff @@
## master #1534 +/- ##
========================================
- Coverage 69.3% 69.3% -0.1%
========================================
Files 72 72
Lines 8732 8737 +5
========================================
Hits 6060 6060
- Misses 1812 1817 +5
Partials 860 860 |
// Returns an error if the target sector cannot be found, or some other bad state is reached. | ||
// Returns false if the target sector is faulty, terminated, or unproven | ||
// Returns true otherwise | ||
func (st *State) CheckSectorHealthExcludeUnproven(store adt.Store, dlIdx, pIdx uint64, sector abi.SectorNumber) (bool, error) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: a more succinct way to put this is CheckSectorActive
|
||
// Prepare message. | ||
params := miner.PreCommitSectorBatchParams{Sectors: make([]miner0.SectorPreCommitInfo, batchSize)} | ||
if expiration == 0 { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please use < 0 or -1
|
||
info := vm.SectorInfo(t, v, minerAddrs.RobustAddress, sectorNumber) | ||
require.Equal(t, 1, len(info.DealIDs)) | ||
require.Equal(t, dealIDs[0], info.DealIDs[0]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: check all other sector info fields, especially sector key and sealed sector id
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
As in the title.