@@ -5214,14 +5214,12 @@ scraperSBvalidationtype ValidateSuperblock(const NN::Superblock& NewFormatSuperb
5214
5214
// Once we find a part that corresponds to the selected project in the given manifest, then break,
5215
5215
// because there can only be one part in a manifest corresponding to a given project.
5216
5216
int nPart = -1 ;
5217
- // int64_t nProjectObjectTime = 0;
5218
5217
uint256 nProjectObjectHash = 0 ;
5219
5218
for (const auto & vectoriter : manifest.projects )
5220
5219
{
5221
5220
if (vectoriter.project == iWhitelistProject.m_name )
5222
5221
{
5223
5222
nPart = vectoriter.part1 ;
5224
- // nProjectObjectTime = vectoriter.LastModified;
5225
5223
break ;
5226
5224
}
5227
5225
}
@@ -5367,7 +5365,7 @@ scraperSBvalidationtype ValidateSuperblock(const NN::Superblock& NewFormatSuperb
5367
5365
5368
5366
Compute number of permutations and cumulative placevalue. For instance, if there were 4 projects, and
5369
5367
the number of candidate parts for each of the projects were 2, 3, 2, and 2, then the total number of
5370
- permutations would be 2 * 3 * 2 * 1 = 12 , and the cumulative placevalue would be
5368
+ permutations would be 2 * 3 * 2 * 2 = 24 , and the cumulative placevalue would be
5371
5369
-------------------- 12, 4, 2, 1. Notice we will use a reverse iterator to fill in the placevalue
5372
5370
as we compute the total number of permutations. This is ridiculous of course because 99.99999% of the
5373
5371
time it is going to be 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 (one permutation) or at most something like
@@ -5843,17 +5841,6 @@ UniValue testnewsb(const UniValue& params, bool fHelp)
5843
5841
5844
5842
if (PastConvergencesSize > 1 )
5845
5843
{
5846
-
5847
- /*
5848
- std::default_random_engine generator(static_cast<unsigned int>(GetAdjustedTime()));
5849
- std::uniform_int_distribution<unsigned int> distribution(0, PastConvergencesSize - 1);
5850
-
5851
- _log(logattribute::INFO, "testnewsb", "NN::ValidateSuperblock random past distribution limits: " + std::to_string(distribution.a())
5852
- + " , " + std::to_string(distribution.b()));
5853
-
5854
- unsigned int i = distribution(generator);
5855
- */
5856
-
5857
5844
int i = GetRandInt (PastConvergencesSize - 1 );
5858
5845
5859
5846
_log (logattribute::INFO, " testnewsb" , " NN::ValidateSuperblock random past RandomPastConvergedManifest index " + std::to_string (i) + " selected." );
0 commit comments