Skip to content

Commit 1a8b12c

Browse files
committed
Merge #13265: wallet: Exit SyncMetaData if there are no transactions to sync
b0d2ca9 wallet: Exit SyncMetaData if there are no transactions to sync (Wladimir J. van der Laan) Pull request description: Instead of crash with an assertion error, simply exit the function `SyncMetaData` if there is no metadata to sync. Fixes #13110. Tree-SHA512: 44c4789497b5b63963bef66d8b695987dde80764199f6ea0f2c974be19d29c2663f32446a663a2ee9029e143e5d1d9e8a591e52e6e7e795b982782626bec25bb
2 parents e545503 + b0d2ca9 commit 1a8b12c

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)