Cleanups.

This commit is contained in:
JoelKatz
2013-01-01 18:20:30 -08:00
parent d27b395c1c
commit 55825b8b5f

View File

@@ -85,8 +85,8 @@ ValidationSet ValidationCollection::getValidations(const uint256& ledger)
{
boost::mutex::scoped_lock sl(mValidationLock);
VSpointer set = findSet(ledger);
if (set != VSpointer())
return *set;
if (set)
return ValidationSet(*set);
}
return ValidationSet();
}
@@ -96,9 +96,9 @@ void ValidationCollection::getValidationCount(const uint256& ledger, bool curren
trusted = untrusted = 0;
boost::mutex::scoped_lock sl(mValidationLock);
VSpointer set = findSet(ledger);
uint32 now = theApp->getOPs().getNetworkTimeNC();
if (set)
{
uint32 now = theApp->getOPs().getNetworkTimeNC();
BOOST_FOREACH(u160_val_pair& it, *set)
{
bool isTrusted = it.second->isTrusted();