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

This commit is contained in:
Peter Rabbitson
2020-12-04 15:45:25 +01:00
committed by Peter Rabbitson
parent 1e6aa4b129
commit 88bd757024
+5 -2
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{