@@ -3937,8 +3937,6 @@ ScraperStatsVerifiedBeaconsTotalCredits GetScraperStatsByConvergedManifest(const
3937
3937
// Enumerate the count of active projects from the dummy converged manifest. One of the parts
3938
3938
// is the beacon list, is not a project, which is why that should not be included in the count.
3939
3939
// Populate the verified beacons map, and if it is don't count that either.
3940
- ScraperPendingBeaconMap VerifiedBeaconMap;
3941
-
3942
3940
int exclude_parts_from_count = 1 ;
3943
3941
3944
3942
auto iter = StructConvergedManifest.ConvergedManifestPartPtrsMap .find (" VerifiedBeacons" );
@@ -3948,7 +3946,7 @@ ScraperStatsVerifiedBeaconsTotalCredits GetScraperStatsByConvergedManifest(const
3948
3946
3949
3947
try
3950
3948
{
3951
- part >> VerifiedBeaconMap ;
3949
+ part >> stats_verified_beacons_tc. mVerifiedMap ;
3952
3950
}
3953
3951
catch (const std::exception & e)
3954
3952
{
@@ -3958,18 +3956,14 @@ ScraperStatsVerifiedBeaconsTotalCredits GetScraperStatsByConvergedManifest(const
3958
3956
++exclude_parts_from_count;
3959
3957
}
3960
3958
3961
- stats_verified_beacons_tc.mVerifiedMap = VerifiedBeaconMap;
3962
-
3963
- std::map<std::string, double > projects_all_cpid_total_credits_map;
3964
-
3965
3959
iter = StructConvergedManifest.ConvergedManifestPartPtrsMap .find (" ProjectsAllCpidTotalCredits" );
3966
3960
if (iter != StructConvergedManifest.ConvergedManifestPartPtrsMap .end ())
3967
3961
{
3968
3962
CDataStream part (iter->second ->data , SER_NETWORK, 1 );
3969
3963
3970
3964
try
3971
3965
{
3972
- part >> projects_all_cpid_total_credits_map ;
3966
+ part >> stats_verified_beacons_tc. m_total_credit_map ;
3973
3967
}
3974
3968
catch (const std::exception & e)
3975
3969
{
@@ -3979,8 +3973,6 @@ ScraperStatsVerifiedBeaconsTotalCredits GetScraperStatsByConvergedManifest(const
3979
3973
++exclude_parts_from_count;
3980
3974
}
3981
3975
3982
- stats_verified_beacons_tc.m_total_credit_map = projects_all_cpid_total_credits_map;
3983
-
3984
3976
unsigned int nActiveProjects = StructConvergedManifest.ConvergedManifestPartPtrsMap .size () - exclude_parts_from_count;
3985
3977
3986
3978
// If a project part is greylisted, do not count it as an active project, even though stats have been collected.
@@ -4660,6 +4652,14 @@ EXCLUSIVE_LOCKS_REQUIRED(cs_StructScraperFileManifest, CScraperManifest::cs_mapM
4660
4652
auto scraper_cmanifest_include_noncurrent_proj_files =
4661
4653
[]() { LOCK (cs_ScraperGlobals); return SCRAPER_CMANIFEST_INCLUDE_NONCURRENT_PROJ_FILES; };
4662
4654
4655
+ // Populate the all cpid total credit map from current entries only. Keep track of the timestamps and assign
4656
+ // the latest manifest file entry timestamp to the total_credit_map_timestamp.
4657
+ if (entry.second .current && !entry.second .excludefromcsmanifest ) {
4658
+ total_credit_map.insert (std::make_pair (entry.first , entry.second .all_cpid_total_credit ));
4659
+
4660
+ total_credit_map_timestamp = std::max (entry.second .timestamp , total_credit_map_timestamp);
4661
+ }
4662
+
4663
4663
// If SCRAPER_CMANIFEST_INCLUDE_NONCURRENT_PROJ_FILES is false, only include current files to send across the
4664
4664
// network. Also continue (exclude) if it is a non-publishable entry (excludefromcsmanifest is true) or
4665
4665
// if it has no records.
@@ -4668,14 +4668,6 @@ EXCLUSIVE_LOCKS_REQUIRED(cs_StructScraperFileManifest, CScraperManifest::cs_mapM
4668
4668
continue ;
4669
4669
}
4670
4670
4671
- // Populate the all cpid total credit map from current entries only. Keep track of the timestamps and assign
4672
- // the latest manifest file entry timestamp to the total_credit_map_timestamp.
4673
- if (entry.second .current ) {
4674
- total_credit_map.insert (std::make_pair (entry.first , entry.second .all_cpid_total_credit ));
4675
-
4676
- total_credit_map_timestamp = std::max (entry.second .timestamp , total_credit_map_timestamp);
4677
- }
4678
-
4679
4671
fs::path inputfile = entry.first ;
4680
4672
4681
4673
fs::path inputfilewpath = pathScraper / inputfile;
0 commit comments