Wallet: Let the interval-flushing thread figure out the filename

This commit is contained in:
Luke Dashjr
2016-09-09 08:15:01 +00:00
parent bfc7aad008
commit fb0c934d1b
4 changed files with 11 additions and 3 deletions

View File

@@ -768,7 +768,7 @@ DBErrors CWalletDB::ZapWalletTx(CWallet* pwallet, vector<CWalletTx>& vWtx)
return DB_LOAD_OK;
}
void ThreadFlushWalletDB(const string& strFile)
void ThreadFlushWalletDB()
{
// Make this thread recognisable as the wallet flushing thread
RenameThread("bitcoin-wallet");
@@ -810,6 +810,7 @@ void ThreadFlushWalletDB(const string& strFile)
if (nRefCount == 0)
{
boost::this_thread::interruption_point();
const std::string& strFile = pwalletMain->strWalletFile;
map<string, int>::iterator _mi = bitdb.mapFileUseCount.find(strFile);
if (_mi != bitdb.mapFileUseCount.end())
{