From bc040e0b9113f4bc01ac3723c5a49879e78f1cb6 Mon Sep 17 00:00:00 2001 From: JoelKatz Date: Mon, 15 Oct 2012 04:12:20 -0700 Subject: [PATCH] Root node is not always an inner node. --- src/SHAMap.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/SHAMap.cpp b/src/SHAMap.cpp index b1596c390..890075215 100644 --- a/src/SHAMap.cpp +++ b/src/SHAMap.cpp @@ -704,9 +704,7 @@ SHAMapTreeNode::pointer SHAMap::fetchNodeExternal(const SHAMapNode& id, const ui try { SHAMapTreeNode::pointer ret = boost::make_shared(id, obj->getData(), mSeq, snfPREFIX); -#ifdef DEBUG assert((ret->getNodeHash() == hash) && (id == *ret)); -#endif return ret; } catch (...) @@ -728,8 +726,8 @@ void SHAMap::fetchRoot(const uint256& hash) Log(lsTRACE) << "Fetch root SHAMap node " << hash; } root = fetchNodeExternal(SHAMapNode(), hash); - root->makeInner(); mTNByID[*root] = root; + assert(root->getNodeHash() == hash); } void SHAMap::armDirty()