Refresh scaning after scoring.

This commit is contained in:
Arthur Britto
2012-04-30 13:24:16 -07:00
parent b341e02eba
commit 39606523f7
2 changed files with 5 additions and 3 deletions

View File

@@ -449,6 +449,9 @@ void UniqueNodeList::scoreTimerHandler(const boost::system::error_code& err)
// Score again if needed. // Score again if needed.
scoreNext(false); scoreNext(false);
// Scan may be dirty due to new ips.
theApp->getConnectionPool().scanRefresh();
} }
} }
@@ -923,14 +926,14 @@ void UniqueNodeList::fetchNext()
if (!bFull) if (!bFull)
{ {
// Determine next scan. // Determine next scan.
std::string strDomain; std::string strDomain;
boost::posix_time::ptime tpNext; boost::posix_time::ptime tpNext;
boost::posix_time::ptime tpNow; boost::posix_time::ptime tpNow;
ScopedLock sl(theApp->getWalletDB()->getDBLock()); ScopedLock sl(theApp->getWalletDB()->getDBLock());
Database *db=theApp->getWalletDB()->getDB(); Database *db=theApp->getWalletDB()->getDB();
if (db->executeSQL("SELECT Domain,Next FROM SeedDomains ORDER BY Next LIMIT 1;") if (db->executeSQL("SELECT Domain,Next FROM SeedDomains INDEXED BY SeedDomainNext ORDER BY Next LIMIT 1;")
&& db->startIterRows()) && db->startIterRows())
{ {
int iNext = db->getInt("Next"); int iNext = db->getInt("Next");

View File

@@ -371,7 +371,6 @@ bool Wallet::nodeIdentityLoad()
ScopedLock sl(theApp->getWalletDB()->getDBLock()); ScopedLock sl(theApp->getWalletDB()->getDBLock());
bool bSuccess = false; bool bSuccess = false;
if(db->executeSQL("SELECT * FROM NodeIdentity;") && db->startIterRows()) if(db->executeSQL("SELECT * FROM NodeIdentity;") && db->startIterRows())
{ {
std::string strPublicKey, strPrivateKey; std::string strPublicKey, strPrivateKey;