Cosmetic changes.

This commit is contained in:
JoelKatz
2012-05-15 18:10:44 -07:00
parent 32f3c7049f
commit 169da7d5e8

View File

@@ -140,7 +140,7 @@ SHAMapTreeNode::pointer SHAMap::getNode(const SHAMapNode& id, const uint256& has
void SHAMap::returnNode(SHAMapTreeNode::pointer& node, bool modify) void SHAMap::returnNode(SHAMapTreeNode::pointer& node, bool modify)
{ // make sure the node is suitable for the intended operation (copy on write) { // make sure the node is suitable for the intended operation (copy on write)
assert(node->isValid()); assert(node->isValid());
if (node && modify && (node->getSeq()!=mSeq)) if (node && modify && (node->getSeq() != mSeq))
{ {
#ifdef DEBUG #ifdef DEBUG
std::cerr << "returnNode COW" << std::endl; std::cerr << "returnNode COW" << std::endl;
@@ -516,17 +516,17 @@ bool SHAMap::addItem(const SHAMapItem& i, bool isTransaction)
bool SHAMap::updateGiveItem(SHAMapItem::pointer item, bool isTransaction) bool SHAMap::updateGiveItem(SHAMapItem::pointer item, bool isTransaction)
{ // can't change the tag but can change the hash { // can't change the tag but can change the hash
uint256 tag=item->getTag(); uint256 tag = item->getTag();
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); assert(false);
return false; return false;