Skip to content

Commit 6c4042a

Browse files
committed
Assert that CWallet::SyncMetaData finds oldest transaction.
This fixes one of the Clang static analyzer warnings mentioned in #9573.
1 parent 22e301a commit 6c4042a

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/wallet/wallet.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -569,6 +569,9 @@ void CWallet::SyncMetaData(std::pair<TxSpends::iterator, TxSpends::iterator> ran
569569
copyFrom = &mapWallet[hash];
570570
}
571571
}
572+
573+
assert(copyFrom);
574+
572575
// Now copy data from copyFrom to rest:
573576
for (TxSpends::iterator it = range.first; it != range.second; ++it)
574577
{

0 commit comments

Comments
 (0)