Use fully static linkage #364
1 changed files with 8 additions and 4 deletions
|
@ -437,6 +437,7 @@ uint256 CClaimTrieCacheBase::recursiveComputeMerkleHash(const std::string& name,
|
|||
if (child.hash->IsNull()) {
|
||||
*child.hash = recursiveComputeMerkleHash(child.name, child.takeoverHeight, checkOnly);
|
||||
}
|
||||
if (!checkOnly)
|
||||
LogPrint(BCLog::CLAIMS, "Using hash of %s (%s): %s, takeover: %d\n", child.name, HexStr(child.name), (*child.hash).GetHex(), child.takeoverHeight);
|
||||
completeHash(*child.hash, child.name, pos);
|
||||
vchToHash.push_back(child.name[pos]);
|
||||
|
@ -638,7 +639,10 @@ bool CClaimTrieCacheBase::addSupport(const std::string& name, const COutPoint& o
|
|||
return false;
|
||||
db << "UPDATE nodes SET hash = NULL WHERE name = ?" << nodeName;
|
||||
|
||||
if (nNextHeight < Params().GetConsensus().nMaxTakeoverWorkaroundHeight) {
|
||||
// we should extend removal workaround since we have situation
|
||||
// when node should be deleted from cache but instead it's keept
|
||||
// because it's a parent one and should not be effectively erased
|
||||
if (nNextHeight < Params().GetConsensus().nMaxTakeoverWorkaroundHeight || true) {
|
||||
auto workaroundQuery = db << "SELECT nodeName FROM claims WHERE nodeName LIKE ?1 "
|
||||
"AND validHeight < ?2 AND expirationHeight >= ?2 ORDER BY nodeName LIMIT 1"
|
||||
<< nodeName + "%" << nNextHeight;
|
||||
|
@ -1183,7 +1187,7 @@ bool CClaimTrieCacheBase::incrementBlock(insertUndoType& insertUndo, claimUndoTy
|
|||
getTakeoverQuery << nameWithTakeover >> std::tie(existingHeight, existingID);
|
||||
getTakeoverQuery++; // reset it
|
||||
|
||||
auto hasBeenSetBefore = existingID != nullptr && !existingID->IsNull();
|
||||
auto hasBeenSetBefore = existingID && !existingID->IsNull();
|
||||
auto takeoverHappening = !hasCandidate || (hasBeenSetBefore && *existingID != candidateValue.claimId);
|
||||
if (takeoverHappening && activateAllFor(insertUndo, insertSupportUndo, nameWithTakeover))
|
||||
hasCandidate = getInfoForName(nameWithTakeover, candidateValue, 1);
|
||||
|
|
Loading…
Add table
Reference in a new issue