mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-05-31 18:22:04 +02:00
walletdb: refactor: drop unused FindWalletTx
parameter and rename
Since commit 3340dbadd38f5624642cf0e14dddbe6f83a3863b ("Remove -zapwallettxes"), the `FindWalletTx` helper is only needed to read tx hashes, so drop the other parameter and rename the method accordingly.
This commit is contained in:
parent
ba47a4ba97
commit
f496528556
@ -974,7 +974,7 @@ DBErrors WalletBatch::LoadWallet(CWallet* pwallet)
|
||||
return result;
|
||||
}
|
||||
|
||||
DBErrors WalletBatch::FindWalletTx(std::vector<uint256>& vTxHash, std::list<CWalletTx>& vWtx)
|
||||
DBErrors WalletBatch::FindWalletTxHashes(std::vector<uint256>& tx_hashes)
|
||||
{
|
||||
DBErrors result = DBErrors::LOAD_OK;
|
||||
|
||||
@ -1012,9 +1012,7 @@ DBErrors WalletBatch::FindWalletTx(std::vector<uint256>& vTxHash, std::list<CWal
|
||||
if (strType == DBKeys::TX) {
|
||||
uint256 hash;
|
||||
ssKey >> 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<uint256>& vTxHash, std::list<CWal
|
||||
|
||||
DBErrors WalletBatch::ZapSelectTx(std::vector<uint256>& vTxHashIn, std::vector<uint256>& vTxHashOut)
|
||||
{
|
||||
// build list of wallet TXs and hashes
|
||||
// build list of wallet TX hashes
|
||||
std::vector<uint256> vTxHash;
|
||||
std::list<CWalletTx> vWtx;
|
||||
DBErrors err = FindWalletTx(vTxHash, vWtx);
|
||||
DBErrors err = FindWalletTxHashes(vTxHash);
|
||||
if (err != DBErrors::LOAD_OK) {
|
||||
return err;
|
||||
}
|
||||
|
@ -273,7 +273,7 @@ public:
|
||||
bool EraseActiveScriptPubKeyMan(uint8_t type, bool internal);
|
||||
|
||||
DBErrors LoadWallet(CWallet* pwallet);
|
||||
DBErrors FindWalletTx(std::vector<uint256>& vTxHash, std::list<CWalletTx>& vWtx);
|
||||
DBErrors FindWalletTxHashes(std::vector<uint256>& tx_hashes);
|
||||
DBErrors ZapSelectTx(std::vector<uint256>& vHashIn, std::vector<uint256>& vHashOut);
|
||||
/* Function to determine if a certain KV/key-type is a key (cryptographical key) type */
|
||||
static bool IsKeyType(const std::string& strType);
|
||||
|
Loading…
x
Reference in New Issue
Block a user