From 5d8de762579424d32c437bc3a7695d25e482c200 Mon Sep 17 00:00:00 2001 From: "Wladimir J. van der Laan" Date: Thu, 17 May 2018 22:07:32 +0200 Subject: [PATCH] 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. Github-Pull: #13265 Rebased-From: b0d2ca9fb66d793e3c0f2e6ede811f1b16c33a9f Tree-SHA512: 67e446e9ced901e37003a9661b6abea268e2ea648ac3b076d91c8d996de96bed389839a09d579a6562d930bcf501a091eb67454f474aae1174108a8650502072 --- src/wallet/wallet.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp index 2b8019395..468d70411 100644 --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -539,7 +539,9 @@ void CWallet::SyncMetaData(std::pair ran } } - assert(copyFrom); + if (!copyFrom) { + return; + } // Now copy data from copyFrom to rest: for (TxSpends::iterator it = range.first; it != range.second; ++it)