diff options
| author | Eelis <[email protected]> | 2017-08-17 15:26:32 +0200 |
|---|---|---|
| committer | Eelis <[email protected]> | 2017-08-17 15:30:37 +0200 |
| commit | 6c4042a5d0796b732f441669117b909a3247e465 (patch) | |
| tree | d16b5cdeb81c393ea816b2c5b2c521f4bb86fe95 /src/wallet/wallet.cpp | |
| parent | Merge #10901: Fix constness of ArgsManager methods (diff) | |
| download | discoin-6c4042a5d0796b732f441669117b909a3247e465.tar.xz discoin-6c4042a5d0796b732f441669117b909a3247e465.zip | |
Assert that CWallet::SyncMetaData finds oldest transaction.
This fixes one of the Clang static analyzer warnings mentioned in #9573.
Diffstat (limited to 'src/wallet/wallet.cpp')
| -rw-r--r-- | src/wallet/wallet.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp index f8c6f9e87..7542be821 100644 --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -569,6 +569,9 @@ void CWallet::SyncMetaData(std::pair<TxSpends::iterator, TxSpends::iterator> ran copyFrom = &mapWallet[hash]; } } + + assert(copyFrom); + // Now copy data from copyFrom to rest: for (TxSpends::iterator it = range.first; it != range.second; ++it) { |