From d63ff6265b0c6ae30efcbb9120d4db419606198a Mon Sep 17 00:00:00 2001 From: Patrick Strateman Date: Sat, 26 Nov 2016 19:32:30 -0800 Subject: Make nWalletDBUpdated atomic to avoid a potential race. --- src/wallet/wallet.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/wallet/wallet.cpp') diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp index 39c4fc3f1..15001776f 100644 --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -3508,7 +3508,7 @@ bool CWallet::InitLoadWallet() walletInstance->ScanForWalletTransactions(pindexRescan, true); LogPrintf(" rescan %15dms\n", GetTimeMillis() - nStart); walletInstance->SetBestChain(chainActive.GetLocator()); - nWalletDBUpdated++; + CWalletDB::IncrementUpdateCounter(); // Restore wallet transaction metadata after -zapwallettxes=1 if (GetBoolArg("-zapwallettxes", false) && GetArg("-zapwallettxes", "1") != "2") -- cgit v1.2.3