Implement a hard fork for extended/infinite claim expiration times #112

Closed
lbrynaut wants to merge 247 commits from claim-expiration into master
2 changed files with 3 additions and 15 deletions
Showing only changes of commit bf45e835fb - Show all commits

View file

@ -448,9 +448,9 @@ bool CClaimTrie::getQueueRow(int nHeight, std::vector<CValueQueueEntry>& row) co
return db.Read(std::make_pair(QUEUE_ROW, nHeight), row); return db.Read(std::make_pair(QUEUE_ROW, nHeight), row);
} }
bool CClaimTrie::getExpirationQueueRow(int nHeight, std::vector<CValueQueueEntry>& row) bool CClaimTrie::getExpirationQueueRow(int nHeight, std::vector<CValueQueueEntry>& row) const
{ {
valueQueueType::iterator itQueueRow = dirtyExpirationQueueRows.find(nHeight); valueQueueType::const_iterator itQueueRow = dirtyExpirationQueueRows.find(nHeight);
if (itQueueRow != dirtyExpirationQueueRows.end()) if (itQueueRow != dirtyExpirationQueueRows.end())
{ {
row = itQueueRow->second; row = itQueueRow->second;
@ -515,17 +515,6 @@ void CClaimTrie::updateSupportQueue(int nHeight, std::vector<CSupportValueQueueE
itQueueRow->second.swap(row); itQueueRow->second.swap(row);
} }
bool CClaimTrie::getSupportNode(std::string name, supportMapNodeType& node)
{
supportMapType::iterator itNode = dirtySupportNodes.find(name);
if (itNode != dirtySupportNodes.end())
{
node = itNode->second;
return true;
}
return db.Read(std::make_pair(SUPPORT, name), node);
}
bool CClaimTrie::getSupportNode(std::string name, supportMapNodeType& node) const bool CClaimTrie::getSupportNode(std::string name, supportMapNodeType& node) const
{ {
supportMapType::const_iterator itNode = dirtySupportNodes.find(name); supportMapType::const_iterator itNode = dirtySupportNodes.find(name);

View file

@ -232,8 +232,7 @@ public:
bool expirationQueueEmpty() const; bool expirationQueueEmpty() const;
void setExpirationTime(int t); void setExpirationTime(int t);
bool getQueueRow(int nHeight, std::vector<CValueQueueEntry>& row) const; bool getQueueRow(int nHeight, std::vector<CValueQueueEntry>& row) const;
bool getExpirationQueueRow(int nHeight, std::vector<CValueQueueEntry>& row); bool getExpirationQueueRow(int nHeight, std::vector<CValueQueueEntry>& row) const;
bool getSupportNode(std::string name, supportMapNodeType& node);
bool getSupportNode(std::string name, supportMapNodeType& node) const; bool getSupportNode(std::string name, supportMapNodeType& node) const;
bool getSupportQueueRow(int nHeight, std::vector<CSupportValueQueueEntry>& row) const; bool getSupportQueueRow(int nHeight, std::vector<CSupportValueQueueEntry>& row) const;
bool haveClaim(const std::string& name, const uint256& txhash, uint32_t nOut) const; bool haveClaim(const std::string& name, const uint256& txhash, uint32_t nOut) const;