From 0f269bc48c3905c0782c9d175ad487b27ebaf54b Mon Sep 17 00:00:00 2001 From: Ava Chow Date: Tue, 20 Feb 2024 11:49:51 -0500 Subject: [PATCH] walletdb: Load Txs last Need to load txs last so that IsMine works. --- src/wallet/walletdb.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/wallet/walletdb.cpp b/src/wallet/walletdb.cpp index 6f552076633..c23686818bd 100644 --- a/src/wallet/walletdb.cpp +++ b/src/wallet/walletdb.cpp @@ -1163,14 +1163,14 @@ DBErrors WalletBatch::LoadWallet(CWallet* pwallet) // Load address book result = std::max(LoadAddressBookRecords(pwallet, *m_batch), result); - // Load tx records - result = std::max(LoadTxRecords(pwallet, *m_batch, any_unordered), result); - // Load SPKMs result = std::max(LoadActiveSPKMs(pwallet, *m_batch), result); // Load decryption keys result = std::max(LoadDecryptionKeys(pwallet, *m_batch), result); + + // Load tx records + result = std::max(LoadTxRecords(pwallet, *m_batch, any_unordered), result); } catch (std::runtime_error& e) { // Exceptions that can be ignored or treated as non-critical are handled by the individual loading functions. // Any uncaught exceptions will be caught here and treated as critical.