Browse Source

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: b0d2ca9fb6
Tree-SHA512: 67e446e9ced901e37003a9661b6abea268e2ea648ac3b076d91c8d996de96bed389839a09d579a6562d930bcf501a091eb67454f474aae1174108a8650502072
tags/v0.16.1
Wladimir J. van der Laan 2 years ago
parent
commit
5d8de76257
No account linked to committer's email address
1 changed files with 3 additions and 1 deletions
  1. 3
    1
      src/wallet/wallet.cpp

+ 3
- 1
src/wallet/wallet.cpp View File

@@ -539,7 +539,9 @@ void CWallet::SyncMetaData(std::pair<TxSpends::iterator, TxSpends::iterator> ran
}
}

assert(copyFrom);
if (!copyFrom) {
return;
}

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

Loading…
Cancel
Save