Skip to content

Commit 50f72ed

Browse files
committed
chore(spcli): improve sectors extend sector skipping info logging
1 parent 61ca37b commit 50f72ed

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

cli/spcli/sectors.go

+10-4
Original file line numberDiff line numberDiff line change
@@ -910,12 +910,18 @@ func SectorsExtendCmd(getActorAddress ActorAddressGetter) *cli.Command {
910910
if !ok {
911911
return xerrors.Errorf("failed to find sector in active sector set: %w", err)
912912
}
913-
if !cctx.Bool("drop-claims") ||
913+
if !cctx.Bool("drop-claims") {
914+
fmt.Printf("skipping sector %d because claim %d (client f0%s, piece %s) cannot be maintained in the extended sector (use --drop-claims to drop claims)\n", sectorNumber, claimId, claim.Client, claim.Data)
915+
cannotExtendSector = true
916+
break
917+
} else if currEpoch <= (claim.TermStart + claim.TermMin) {
914918
// FIP-0045 requires the claim minimum duration to have passed
915-
currEpoch <= (claim.TermStart+claim.TermMin) ||
919+
fmt.Printf("skipping sector %d because claim %d (client f0%s, piece %s) has not reached its minimum duration\n", sectorNumber, claimId, claim.Client, claim.Data)
920+
cannotExtendSector = true
921+
break
922+
} else if currEpoch <= sectorInfo.Expiration-builtin.EndOfLifeClaimDropPeriod {
916923
// FIP-0045 requires the sector to be in its last 30 days of life
917-
(currEpoch <= sectorInfo.Expiration-builtin.EndOfLifeClaimDropPeriod) {
918-
fmt.Printf("skipping sector %d because claim %d (client f0%s, piece %s) does not live long enough \n", sectorNumber, claimId, claim.Client, claim.Data)
924+
fmt.Printf("skipping sector %d because claim %d (client f0%s, piece %s) is not in its last 30 days of life\n", sectorNumber, claimId, claim.Client, claim.Data)
919925
cannotExtendSector = true
920926
break
921927
}

0 commit comments

Comments
 (0)