removed superfluous fRequireTakeoverHeights
This commit is contained in:
parent
53cfe761f6
commit
2df70eeed1
4 changed files with 8 additions and 12 deletions
|
@ -579,7 +579,7 @@ bool CClaimTrieCacheBase::ReadFromDisk(const CBlockIndex* tip)
|
|||
return false;
|
||||
}
|
||||
|
||||
CClaimTrieCacheBase::CClaimTrieCacheBase(CClaimTrie* base, bool fRequireTakeoverHeights) : base(base), fRequireTakeoverHeights(fRequireTakeoverHeights)
|
||||
CClaimTrieCacheBase::CClaimTrieCacheBase(CClaimTrie* base) : base(base)
|
||||
{
|
||||
assert(base);
|
||||
nNextHeight = base->nNextHeight;
|
||||
|
@ -1287,8 +1287,6 @@ int CClaimTrieCacheBase::getNumBlocksOfContinuousOwnership(const std::string& na
|
|||
|
||||
int CClaimTrieCacheBase::getDelayForName(const std::string& name) const
|
||||
{
|
||||
if (!fRequireTakeoverHeights)
|
||||
return 0;
|
||||
int nBlocksOfContinuousOwnership = getNumBlocksOfContinuousOwnership(name);
|
||||
return std::min(nBlocksOfContinuousOwnership / base->nProportionalDelayFactor, 4032);
|
||||
}
|
||||
|
|
|
@ -384,7 +384,7 @@ typedef std::vector<CClaimIndexElement> claimIndexElementListType;
|
|||
class CClaimTrieCacheBase
|
||||
{
|
||||
public:
|
||||
explicit CClaimTrieCacheBase(CClaimTrie* base, bool fRequireTakeoverHeights = true);
|
||||
explicit CClaimTrieCacheBase(CClaimTrie* base);
|
||||
virtual ~CClaimTrieCacheBase() = default;
|
||||
|
||||
uint256 getMerkleHash();
|
||||
|
@ -487,8 +487,6 @@ private:
|
|||
|
||||
std::unordered_map<std::string, std::pair<uint160, int>> takeoverCache;
|
||||
|
||||
bool fRequireTakeoverHeights;
|
||||
|
||||
claimQueueType claimQueueCache; // claims not active yet: to be written to disk on flush
|
||||
queueNameType claimQueueNameCache;
|
||||
supportQueueType supportQueueCache; // supports not active yet: to be written to disk on flush
|
||||
|
@ -565,7 +563,7 @@ private:
|
|||
class CClaimTrieCacheExpirationFork : public CClaimTrieCacheBase
|
||||
{
|
||||
public:
|
||||
explicit CClaimTrieCacheExpirationFork(CClaimTrie* base, bool fRequireTakeoverHeights = true);
|
||||
explicit CClaimTrieCacheExpirationFork(CClaimTrie* base);
|
||||
|
||||
void setExpirationTime(int time);
|
||||
int expirationTime() const override;
|
||||
|
@ -591,8 +589,8 @@ private:
|
|||
class CClaimTrieCacheNormalizationFork : public CClaimTrieCacheExpirationFork
|
||||
{
|
||||
public:
|
||||
explicit CClaimTrieCacheNormalizationFork(CClaimTrie* base, bool fRequireTakeoverHeights = true)
|
||||
: CClaimTrieCacheExpirationFork(base, fRequireTakeoverHeights), overrideInsertNormalization(false), overrideRemoveNormalization(false)
|
||||
explicit CClaimTrieCacheNormalizationFork(CClaimTrie* base)
|
||||
: CClaimTrieCacheExpirationFork(base), overrideInsertNormalization(false), overrideRemoveNormalization(false)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
@ -9,8 +9,8 @@
|
|||
#include <boost/locale/localization_backend.hpp>
|
||||
#include <boost/scope_exit.hpp>
|
||||
|
||||
CClaimTrieCacheExpirationFork::CClaimTrieCacheExpirationFork(CClaimTrie* base, bool fRequireTakeoverHeights)
|
||||
: CClaimTrieCacheBase(base, fRequireTakeoverHeights)
|
||||
CClaimTrieCacheExpirationFork::CClaimTrieCacheExpirationFork(CClaimTrie* base)
|
||||
: CClaimTrieCacheBase(base)
|
||||
{
|
||||
setExpirationTime(Params().GetConsensus().GetExpirationTime(nNextHeight));
|
||||
}
|
||||
|
|
|
@ -12,7 +12,7 @@ using namespace std;
|
|||
class CClaimTrieCacheTest : public CClaimTrieCacheBase
|
||||
{
|
||||
public:
|
||||
explicit CClaimTrieCacheTest(CClaimTrie* base): CClaimTrieCacheBase(base, false)
|
||||
explicit CClaimTrieCacheTest(CClaimTrie* base): CClaimTrieCacheBase(base)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue