Cleanups.

This commit is contained in:
JoelKatz
2012-05-15 17:37:57 -07:00
parent 64616ec945
commit 0efeedffdc
2 changed files with 7 additions and 7 deletions

View File

@@ -111,7 +111,7 @@ SHAMapTreeNode::pointer SHAMap::getNode(const SHAMapNode& id, const uint256& has
SHAMapTreeNode::pointer node = checkCacheNode(id);
if (node)
{
if (node->getNodeHash()!=hash)
if (node->getNodeHash() != hash)
{
#ifdef DEBUG
std::cerr << "Attempt to get node, hash not in tree" << std::endl;
@@ -127,7 +127,7 @@ SHAMapTreeNode::pointer SHAMap::getNode(const SHAMapNode& id, const uint256& has
}
std::vector<unsigned char> nodeData;
if(!fetchNode(hash, nodeData)) return SHAMapTreeNode::pointer();
if (!fetchNode(hash, nodeData)) return SHAMapTreeNode::pointer();
node = boost::make_shared<SHAMapTreeNode>(id, nodeData, mSeq);
if (node->getNodeHash() != hash) throw SHAMapException(InvalidNode);
@@ -344,10 +344,10 @@ SHAMapItem::pointer SHAMap::peekItem(const uint256& id)
bool SHAMap::hasItem(const uint256& id)
{ // does the tree have an item with this ID
boost::recursive_mutex::scoped_lock sl(mLock);
SHAMapTreeNode::pointer leaf=walkTo(id, false);
if(!leaf) return false;
SHAMapItem::pointer item=leaf->peekItem();
if(!item || item->getTag()!=id) return false;
SHAMapTreeNode::pointer leaf = walkTo(id, false);
if (!leaf) return false;
SHAMapItem::pointer item = leaf->peekItem();
if (!item || item->getTag() != id) return false;
return true;
}

View File

@@ -189,7 +189,7 @@ TransactionEngineResult TransactionEngine::applyTransaction(const SerializedTran
if (result == terSUCCESS)
{ // Write back the account states and add the transaction to the ledger
// WRITEME: Special case code for changing transaction key
for (std::vector<AffectedAccount>::iterator it=accounts.begin(), end=accounts.end();
for (std::vector<AffectedAccount>::iterator it = accounts.begin(), end = accounts.end();
it != end; ++it)
{
if (it->first == taaCREATE)