Fix tag check in SHAMap.

This commit is contained in:
Arthur Britto
2012-05-15 16:18:23 -07:00
parent 7ca88ebb14
commit 0b5a5e710e
2 changed files with 3 additions and 3 deletions

View File

@@ -33,7 +33,7 @@ LedgerStateParms Ledger::writeBack(LedgerStateParms parms, SerializedLedgerEntry
return lepCREATED;
}
if(!mAccountStateMap->updateGiveItem(item, false))
if (!mAccountStateMap->updateGiveItem(item, false))
{
assert(false);
return lepERROR;

View File

@@ -520,12 +520,12 @@ bool SHAMap::updateGiveItem(SHAMapItem::pointer item, bool isTransaction)
boost::recursive_mutex::scoped_lock sl(mLock);
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();
stack.pop();
if (!node->isLeaf() || (node->peekItem()->getTag() == tag) )
if (!node->isLeaf() || (node->peekItem()->getTag() != tag) )
{
assert(false);
return false;