mirror of
https://github.com/Xahau/xahaud.git
synced 2025-12-06 17:27:52 +00:00
Cleanups.
This commit is contained in:
@@ -690,7 +690,10 @@ SHAMapTreeNode::pointer SHAMap::fetchNodeExternal(const SHAMapNode& id, const ui
|
||||
|
||||
HashedObject::pointer obj(theApp->getHashedObjectStore().retrieve(hash));
|
||||
if (!obj)
|
||||
{
|
||||
Log(lsTRACE) << "fetchNodeExternal: missing " << hash;
|
||||
throw SHAMapMissingNode(mType, id, hash);
|
||||
}
|
||||
assert(Serializer::getSHA512Half(obj->getData()) == hash);
|
||||
|
||||
try
|
||||
@@ -708,6 +711,13 @@ SHAMapTreeNode::pointer SHAMap::fetchNodeExternal(const SHAMapNode& id, const ui
|
||||
}
|
||||
}
|
||||
|
||||
void SHAMap::fetchRoot(const uint256& hash)
|
||||
{
|
||||
root = fetchNodeExternal(SHAMapNode(), hash);
|
||||
root->makeInner();
|
||||
mTNByID[*root] = root;
|
||||
}
|
||||
|
||||
void SHAMap::armDirty()
|
||||
{ // begin saving dirty nodes
|
||||
++mSeq;
|
||||
|
||||
Reference in New Issue
Block a user