Only count the first 10 copies of the same piece per project

This commit is contained in:
Peter Rabbitson 2020-12-03 19:11:59 +00:00 committed by Peter Rabbitson
parent 1e6aa4b129
commit 88bd757024

View File

@ -281,8 +281,6 @@ var rollupDealStatsCmd = &cli.Command{
}
grandTotals.seenProject[projID] = true
grandTotals.seenClient[clientAddr] = true
projStatEntry, ok := projStats[projID]
if !ok {
projStatEntry = &projectAggregateStats{
@ -294,6 +292,11 @@ var rollupDealStatsCmd = &cli.Command{
projStats[projID] = projStatEntry
}
if projStatEntry.cidDeals[dealInfo.Proposal.PieceCID] >= 10 {
continue
}
grandTotals.seenClient[clientAddr] = true
clientStatEntry, ok := projStatEntry.ClientStats[clientAddr.String()]
if !ok {
clientStatEntry = &clientAggregateStats{