mirror of
https://github.com/Xahau/xahaud.git
synced 2025-12-06 17:27:52 +00:00
TMGetObjectByHash needs to know the object type.
This commit is contained in:
@@ -91,8 +91,9 @@ void SHAMap::getMissingNodes(std::vector<SHAMapNode>& nodeIDs, std::vector<uint2
|
||||
}
|
||||
}
|
||||
|
||||
void SHAMap::getNeededHashes(std::vector<uint256>& ret, int max)
|
||||
std::vector<uint256> SHAMap::getNeededHashes(int max)
|
||||
{
|
||||
std::vector<uint256> ret;
|
||||
boost::recursive_mutex::scoped_lock sl(mLock);
|
||||
|
||||
assert(root->isValid());
|
||||
@@ -100,7 +101,7 @@ void SHAMap::getNeededHashes(std::vector<uint256>& ret, int max)
|
||||
if (root->isFullBelow() || !root->isInner())
|
||||
{
|
||||
clearSynching();
|
||||
return;
|
||||
return ret;
|
||||
}
|
||||
|
||||
std::stack<SHAMapTreeNode*> stack;
|
||||
@@ -133,13 +134,14 @@ void SHAMap::getNeededHashes(std::vector<uint256>& ret, int max)
|
||||
have_all = false;
|
||||
ret.push_back(childHash);
|
||||
if (--max <= 0)
|
||||
return;
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (have_all)
|
||||
node->setFullBelow();
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
bool SHAMap::getNodeFat(const SHAMapNode& wanted, std::vector<SHAMapNode>& nodeIDs,
|
||||
|
||||
Reference in New Issue
Block a user