Compare commits

..

2 commits

Author SHA1 Message Date
Brannon King
71fc94b1de
Merge pull request #410 from mjovanc/master 2021-11-26 18:37:08 -05:00
Marcus Cvjeticanin
927876e0c0 Changing download path artifactory URL for Boost 2021-11-26 20:52:04 +01:00
3 changed files with 5 additions and 52 deletions

View file

@ -1,6 +1,6 @@
package=boost
$(package)_version=1_69_0
$(package)_download_path=https://dl.bintray.com/boostorg/release/1.69.0/source/
$(package)_download_path=https://boostorg.jfrog.io/artifactory/main/release/1.69.0/source/
$(package)_file_name=$(package)_$($(package)_version).tar.bz2
$(package)_sha256_hash=8f32d4617390d1c2d16f26a27ab60d97807b35440d45891fa340fc2648b04406
$(package)_dependencies=icu

View file

@ -442,17 +442,8 @@ uint256 recursiveMerkleHash(TIterator& it, const iCbType<TIterator>& process)
bool CClaimTrieCacheBase::recursiveCheckConsistency(CClaimTrie::const_iterator& it, std::string& failed) const
{
struct CRecursiveBreak {};
int nodesVisited = 0;
int reportDone = 0;
using iterator = CClaimTrie::const_iterator;
iCbType<iterator> process = [this, &reportDone, &nodesVisited, &failed, &process](iterator& it) {
int percentageDone = std::max(1, std::min(99, (int)((double)nodesVisited / (double)base->height() * 100)));
if (reportDone < percentageDone/10) {
// report every 10% step
LogPrintf("[%d%%]...", percentageDone); /* Continued */
reportDone = percentageDone/10;
}
nodesVisited++;
iCbType<iterator> process = [&failed, &process](iterator& it) {
if (it->hash.IsNull() || it->hash != recursiveMerkleHash(it, process)) {
failed = it.key();
throw CRecursiveBreak();
@ -460,7 +451,6 @@ bool CClaimTrieCacheBase::recursiveCheckConsistency(CClaimTrie::const_iterator&
};
try {
LogPrintf("[0%%]..."); /* Continued */
process(it);
} catch (const CRecursiveBreak&) {
return false;
@ -586,28 +576,11 @@ bool CClaimTrieCacheBase::ReadFromDisk(const CBlockIndex* tip)
base->clear();
boost::scoped_ptr<CDBIterator> pcursor(base->db->NewIterator());
LogPrintf("[0%%]..."); /* Continued */
int totalRecords = 0;
for (pcursor->SeekToFirst(); pcursor->Valid(); pcursor->Next()) {
totalRecords++;
}
int reportDone = 0;
int recordsDone = 0;
int totalNodes = 0;
for (pcursor->SeekToFirst(); pcursor->Valid(); recordsDone++, pcursor->Next()) {
int percentageDone = std::max(1, std::min(99, (int)((double)recordsDone / (double)totalRecords * 50)));
if (reportDone < percentageDone/10) {
// report every 10% step
LogPrintf("[%d%%]...", percentageDone); /* Continued */
reportDone = percentageDone/10;
}
std::pair<uint8_t, std::string> key;
if (!pcursor->GetKey(key) || key.first != TRIE_NODE)
continue;
totalNodes++;
CClaimTrieData data;
if (pcursor->GetValue(data)) {
if (data.empty()) {
@ -626,16 +599,7 @@ bool CClaimTrieCacheBase::ReadFromDisk(const CBlockIndex* tip)
}
}
reportDone = 0;
recordsDone = 0;
LogPrintf("[50%%]..."); /* Continued */
for (pcursor->SeekToFirst(); pcursor->Valid(); recordsDone++, pcursor->Next()) {
int percentageDone = std::max(1, std::min(99, (int)((double)recordsDone / (double)totalRecords * 50)));
if (reportDone < percentageDone/10) {
// report every 10% step
LogPrintf("[%d%%]...", 50+percentageDone); /* Continued */
reportDone = percentageDone/10;
}
for (pcursor->SeekToFirst(); pcursor->Valid(); pcursor->Next()) {
std::pair<uint8_t, std::string> key;
if (!pcursor->GetKey(key) || key.first != TRIE_NODE)
continue;
@ -649,9 +613,8 @@ bool CClaimTrieCacheBase::ReadFromDisk(const CBlockIndex* tip)
base->db->Erase(key); // this uses a lot of memory and it's 1-time upgrade from 12.4 so we aren't going to batch it
}
}
LogPrintf("[Done].\n");
LogPrintf("Checking claim trie consistency... \n");
LogPrintf("Checking claim trie consistency... ");
if (checkConsistency()) {
LogPrintf("consistent\n");
if (tip && tip->hashClaimTrie != getMerkleHash())

View file

@ -312,17 +312,8 @@ bool CClaimTrieCacheHashFork::recursiveCheckConsistency(CClaimTrie::const_iterat
return CClaimTrieCacheNormalizationFork::recursiveCheckConsistency(it, failed);
struct CRecursiveBreak {};
int nodesVisited = 0;
int reportDone = 0;
using iterator = CClaimTrie::const_iterator;
iCbType<iterator> process = [this, &reportDone, &nodesVisited, &failed, &process](iterator& it) -> uint256 {
int percentageDone = std::max(1, std::min(99, (int)((double)nodesVisited / (double)base->height() * 100)));
if (reportDone < percentageDone/10) {
// report every 10% step
LogPrintf("[%d%%]...", percentageDone); /* Continued */
reportDone = percentageDone/10;
}
nodesVisited++;
iCbType<iterator> process = [&failed, &process](iterator& it) -> uint256 {
if (it->hash.IsNull() || it->hash != recursiveBinaryTreeHash(it, process)) {
failed = it.key();
throw CRecursiveBreak();
@ -331,7 +322,6 @@ bool CClaimTrieCacheHashFork::recursiveCheckConsistency(CClaimTrie::const_iterat
};
try {
LogPrintf("[0%%]..."); /* Continued */
process(it);
} catch (const CRecursiveBreak&) {
return false;