Skip to content

Commit b0d2ca9

Browse files
committed
wallet: Exit SyncMetaData if there are no transactions to sync
Instead of crash with an assertion error, simply exit the function `SyncMetaData` if there is no metadata to sync. Fixes #13110.
1 parent 1b53e4f commit b0d2ca9

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/wallet/wallet.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -549,7 +549,9 @@ void CWallet::SyncMetaData(std::pair<TxSpends::iterator, TxSpends::iterator> ran
549549
}
550550
}
551551

552-
assert(copyFrom);
552+
if (!copyFrom) {
553+
return;
554+
}
553555

554556
// Now copy data from copyFrom to rest:
555557
for (TxSpends::iterator it = range.first; it != range.second; ++it)

0 commit comments

Comments
 (0)