Ledger functions to handle transaction metadata.

This commit is contained in:
JoelKatz
2012-09-12 18:40:16 -07:00
parent 1ba5b02f14
commit d2336e3eea
5 changed files with 66 additions and 4 deletions

View File

@@ -421,6 +421,16 @@ SHAMapItem::pointer SHAMap::peekItem(const uint256& id)
return leaf->peekItem();
}
SHAMapItem::pointer SHAMap::peekItem(const uint256& id, SHAMapTreeNode::TNType& type)
{
boost::recursive_mutex::scoped_lock sl(mLock);
SHAMapTreeNode* leaf = walkToPointer(id);
if (!leaf)
return SHAMapItem::pointer();
type = leaf->getType();
return leaf->peekItem();
}
bool SHAMap::hasItem(const uint256& id)
{ // does the tree have an item with this ID
boost::recursive_mutex::scoped_lock sl(mLock);