diff --git a/src/wallet/walletdb.cpp b/src/wallet/walletdb.cpp index 826cecfb6f0..4382e88bc2c 100644 --- a/src/wallet/walletdb.cpp +++ b/src/wallet/walletdb.cpp @@ -974,7 +974,7 @@ DBErrors WalletBatch::LoadWallet(CWallet* pwallet) return result; } -DBErrors WalletBatch::FindWalletTx(std::vector& vTxHash, std::list& vWtx) +DBErrors WalletBatch::FindWalletTxHashes(std::vector& tx_hashes) { DBErrors result = DBErrors::LOAD_OK; @@ -1012,9 +1012,7 @@ DBErrors WalletBatch::FindWalletTx(std::vector& vTxHash, std::list> hash; - vTxHash.push_back(hash); - vWtx.emplace_back(/*tx=*/nullptr, TxStateInactive{}); - ssValue >> vWtx.back(); + tx_hashes.push_back(hash); } } } catch (...) { @@ -1027,10 +1025,9 @@ DBErrors WalletBatch::FindWalletTx(std::vector& vTxHash, std::list& vTxHashIn, std::vector& vTxHashOut) { - // build list of wallet TXs and hashes + // build list of wallet TX hashes std::vector vTxHash; - std::list vWtx; - DBErrors err = FindWalletTx(vTxHash, vWtx); + DBErrors err = FindWalletTxHashes(vTxHash); if (err != DBErrors::LOAD_OK) { return err; } diff --git a/src/wallet/walletdb.h b/src/wallet/walletdb.h index 27b5dbdd963..e37a31c6196 100644 --- a/src/wallet/walletdb.h +++ b/src/wallet/walletdb.h @@ -273,7 +273,7 @@ public: bool EraseActiveScriptPubKeyMan(uint8_t type, bool internal); DBErrors LoadWallet(CWallet* pwallet); - DBErrors FindWalletTx(std::vector& vTxHash, std::list& vWtx); + DBErrors FindWalletTxHashes(std::vector& tx_hashes); DBErrors ZapSelectTx(std::vector& vHashIn, std::vector& vHashOut); /* Function to determine if a certain KV/key-type is a key (cryptographical key) type */ static bool IsKeyType(const std::string& strType);