Make sure we update mTNByID when we replace the root

This commit is contained in:
David Schwartz
2014-08-20 13:52:47 -07:00
committed by Vinnie Falco
parent e7cf3e8084
commit 9aad60f56d

View File

@@ -1107,10 +1107,11 @@ bool SHAMap::fetchRoot (uint256 const& hash, SHAMapSyncFilter* filter)
root = std::make_shared<SHAMapTreeNode> (nodeData,
mSeq - 1, snfPREFIX, hash, true);
mTNByID.replace(SHAMapNodeID (), root);
filter->gotNode (true, SHAMapNodeID (), hash, nodeData, root->getType ());
}
mTNByID.replace(SHAMapNodeID (), root);
assert (root->getNodeHash () == hash);
return true;
}