mirror of
https://github.com/Xahau/xahaud.git
synced 2025-12-06 17:27:52 +00:00
Tiny cleanup.
This commit is contained in:
@@ -519,17 +519,20 @@ bool SHAMap::updateGiveItem(SHAMapItem::pointer item, bool isTransaction)
|
|||||||
|
|
||||||
boost::recursive_mutex::scoped_lock sl(mLock);
|
boost::recursive_mutex::scoped_lock sl(mLock);
|
||||||
|
|
||||||
std::stack<SHAMapTreeNode::pointer> stack=getStack(tag, true);
|
std::stack<SHAMapTreeNode::pointer> stack = getStack(tag, true);
|
||||||
if(stack.empty()) throw SHAMapException(MissingNode);
|
if(stack.empty()) throw SHAMapException(MissingNode);
|
||||||
|
|
||||||
SHAMapTreeNode::pointer node=stack.top();
|
SHAMapTreeNode::pointer node=stack.top();
|
||||||
stack.pop();
|
stack.pop();
|
||||||
|
|
||||||
if(!node->isLeaf() || (node->peekItem()->getTag()==tag) )
|
if (!node->isLeaf() || (node->peekItem()->getTag() == tag) )
|
||||||
|
{
|
||||||
|
assert(false);
|
||||||
return false;
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
returnNode(node, true);
|
returnNode(node, true);
|
||||||
if(!node->setItem(item, isTransaction ? SHAMapTreeNode::tnTRANSACTION : SHAMapTreeNode::tnACCOUNT_STATE))
|
if (!node->setItem(item, isTransaction ? SHAMapTreeNode::tnTRANSACTION : SHAMapTreeNode::tnACCOUNT_STATE))
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
dirtyUp(stack, tag, node->getNodeHash());
|
dirtyUp(stack, tag, node->getNodeHash());
|
||||||
|
|||||||
Reference in New Issue
Block a user