Skip to content

Commit

Permalink
fix: reduce log output
Browse files Browse the repository at this point in the history
  • Loading branch information
simlecode committed Apr 25, 2024
1 parent 6c5ce99 commit c4dcb4a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions storageprovider/deal_assigner.go
Original file line number Diff line number Diff line change
Expand Up @@ -430,7 +430,6 @@ func (ps *dealAssigner) AssignDeals(ctx context.Context, sid abi.SectorID, ssize
directDealLog.Errorf("assign direct deals failed: %v", err)
errs = multierror.Append(errs, err)
}
log.Infof("assigned direct deals %d for miner %v", len(deals), sid.Miner)

var out []*types.DealInfoV2
for _, d := range deals {
Expand All @@ -448,6 +447,7 @@ func (ps *dealAssigner) AssignDeals(ctx context.Context, sid abi.SectorID, ssize
})
}
if len(out) > 0 {
log.Infof("assigned direct deals %d for miner %v", len(deals), sid.Miner)
return out, nil
}

Expand All @@ -468,7 +468,6 @@ func (ps *dealAssigner) AssignDeals(ctx context.Context, sid abi.SectorID, ssize
EndEpoch: d.EndEpoch,
})
}
log.Infof("assigned deals %d for miner %v", len(oldDeals), sid.Miner)
} else {
directDealLog.Errorf("assign unpacked deals failed: %v", err)
errs = multierror.Append(errs, err)
Expand All @@ -477,6 +476,7 @@ func (ps *dealAssigner) AssignDeals(ctx context.Context, sid abi.SectorID, ssize
if len(out) == 0 {
return out, errs.ErrorOrNil()
}
log.Infof("assigned deals %d for miner %v", len(oldDeals), sid.Miner)

return out, nil
}
Expand Down

0 comments on commit c4dcb4a

Please sign in to comment.