From 6c4042a5d0796b732f441669117b909a3247e465 Mon Sep 17 00:00:00 2001 From: Eelis Date: Thu, 17 Aug 2017 15:26:32 +0200 Subject: [PATCH] Assert that CWallet::SyncMetaData finds oldest transaction. This fixes one of the Clang static analyzer warnings mentioned in #9573. --- src/wallet/wallet.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp index f8c6f9e87b..7542be8216 100644 --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -569,6 +569,9 @@ void CWallet::SyncMetaData(std::pair ran copyFrom = &mapWallet[hash]; } } + + assert(copyFrom); + // Now copy data from copyFrom to rest: for (TxSpends::iterator it = range.first; it != range.second; ++it) {