mirror of
https://github.com/Xahau/xahaud.git
synced 2025-12-06 17:27:52 +00:00
Refresh scaning after scoring.
This commit is contained in:
@@ -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");
|
||||||
|
|||||||
@@ -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;
|
||||||
|
|||||||
Reference in New Issue
Block a user