Commit d740e376 authored by Brannon King's avatar Brannon King
Browse files

reverted accidental use of c++11 const

don't skip build by dir alone
parent 1bf736a1
......@@ -362,14 +362,11 @@ function build_dependency() {
if [ ! -d "${PREFIX}" ]; then
trap 'cleanup "${PREFIX}" "${LOG}"' INT TERM EXIT
rm -rf ${PREFIX}
mkdir -p "${PREFIX}"
mkdir -p "${PREFIX}"
trap 'cleanup "${PREFIX}" "${LOG}"' INT TERM EXIT
"${BUILD}" "${LOG}"
......@@ -285,14 +285,16 @@ typedef std::vector<CClaimIndexElement> claimIndexElementListType;
struct claimsForNameType
const std::vector<CClaimValue> claims;
const std::vector<CSupportValue> supports;
const int nLastTakeoverHeight;
const std::string name;
std::vector<CClaimValue> claims;
std::vector<CSupportValue> supports;
int nLastTakeoverHeight;
std::string name;
claimsForNameType(std::vector<CClaimValue> claims, std::vector<CSupportValue> supports,
claimsForNameType(const std::vector<CClaimValue>& claims, const std::vector<CSupportValue>& supports,
int nLastTakeoverHeight, const std::string& name)
: claims(claims), supports(supports), nLastTakeoverHeight(nLastTakeoverHeight), name(name) {}
virtual ~claimsForNameType() {}
class CClaimTrieCacheBase;
......@@ -528,7 +530,7 @@ public:
supportQueueRowType& expireSupportUndo,
std::vector<std::pair<std::string, int> >& takeoverHeightUndo);
~CClaimTrieCacheBase() { clear(); }
virtual ~CClaimTrieCacheBase() { clear(); }
virtual bool getProofForName(const std::string& name, CClaimTrieProof& proof) const;
virtual bool getInfoForName(const std::string& name, CClaimValue& claim) const;
......@@ -662,6 +664,8 @@ public:
CClaimTrieCacheExpirationFork(CClaimTrie* base, bool fRequireTakeoverHeights = true)
: CClaimTrieCacheBase(base, fRequireTakeoverHeights) {}
virtual ~CClaimTrieCacheExpirationFork() {}
bool forkForExpirationChange(bool increment) const;
// TODO: move the expiration fork code from main.cpp to overrides of increment/decrement block
......@@ -677,6 +681,8 @@ public:
: CClaimTrieCacheExpirationFork(base, fRequireTakeoverHeights),
overrideInsertNormalization(false), overrideRemoveNormalization(false) {}
virtual ~CClaimTrieCacheNormalizationFork() {}
bool shouldNormalize() const;
// lower-case and normalize any input string name
......@@ -178,8 +178,8 @@ bool CClaimTrieCacheNormalizationFork::removeSupportFromMap(const std::string& n
struct claimsForNormalization: public claimsForNameType {
const std::string normalized;
claimsForNormalization(std::vector<CClaimValue> claims, std::vector<CSupportValue> supports,
std::string normalized;
claimsForNormalization(const std::vector<CClaimValue>& claims, const std::vector<CSupportValue>& supports,
int nLastTakeoverHeight, const std::string& name, const std::string& normalized)
: claimsForNameType(claims, supports, nLastTakeoverHeight, name), normalized(normalized) {}
......@@ -199,7 +199,8 @@ bool CClaimTrieCacheNormalizationFork::normalizeAllNamesInTrieIfNecessary(insert
supportMapEntryType supports;
owner->getSupportsForName(name, supports);
hits.push_back(claimsForNormalization(node->claims, supports, node->nHeightOfLastTakeover, name, normalized));
const claimsForNormalization cfn(node->claims, supports, node->nHeightOfLastTakeover, name, normalized);
......@@ -23,7 +23,7 @@ unsigned int GetNextWorkRequired(const CBlockIndex* pindexLast, const CBlockHead
// Special difficulty rule for testnet:
// If the new block's timestamp is twice the target block time
// then allow mining of a min-difficulty block.
// This is to prevent the testnet from gettig stuck when a large amount
// This is to prevent the testnet from getting stuck when a large amount
// of hashrate drops off the network.
// This rule was not implemented properly until testnet block 277299.
if (pblock->GetBlockTime() > pindexLast->GetBlockTime() + params.nPowTargetSpacing*2){
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment