cmd/tools/segment-verify: don't double-count notfound

When this branch is followed, `audit.OutcomeFailure` is returned, and
`MarkNotFound()` is immediately called again (in
`(*NodeVerifier).Verify()`). Calling `MarkNotFound()` twice for the same
piece is not correct.

Change-Id: I1a2764bc32ed015628fcd9353ac3307f269b4bbd
This commit is contained in:
paul cannon 2022-12-27 14:51:26 -06:00 committed by Storj Robot
parent aec596bb39
commit 9544936794

View File

@ -198,7 +198,6 @@ func (service *NodeVerifier) verifySegment(ctx context.Context, client *piecesto
if err != nil {
logger.Error("download failed", zap.Error(err))
if errs2.IsRPC(err, rpcstatus.NotFound) {
segment.Status.MarkNotFound()
return audit.OutcomeFailure, nil
}
if errs2.IsRPC(err, rpcstatus.Unknown) {