Mark a FIXME for some cases this code mishandles. (I'll fix it shortly.)

This commit is contained in:
JoelKatz
2012-07-11 18:16:47 -07:00
parent 9e60cfc925
commit c637c01abc
2 changed files with 8 additions and 0 deletions

View File

@@ -46,6 +46,13 @@ SHAMap::SHAMap(uint32 seq) : mSeq(seq), mState(Modifying)
mTNByID[*root] = root;
}
SHAMap::SHAMap(const uint256& hash) : mSeq(0), mState(Synching)
{ // FIXME: Need to acquire root node
root = boost::make_shared<SHAMapTreeNode>(mSeq, SHAMapNode(0, uint256()));
root->makeInner();
mTNByID[*root] = root;
}
SHAMap::pointer SHAMap::snapShot(bool isMutable)
{ // Return a new SHAMap that is an immutable snapshot of this one
// Initially nodes are shared, but CoW is forced on both ledgers

View File

@@ -290,6 +290,7 @@ public:
// build new map
SHAMap(uint32 seq = 0);
SHAMap(const uint256& hash);
// Returns a new map that's a snapshot of this one. Force CoW
SHAMap::pointer snapShot(bool isMutable);