mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-04-06 05:37:50 +02:00
refactor: Convert mini_miner from uint256 to Txid
This commit is contained in:
@@ -983,13 +983,13 @@ CTxMemPool::setEntries CTxMemPool::GetIterSet(const std::set<Txid>& hashes) cons
|
||||
return ret;
|
||||
}
|
||||
|
||||
std::vector<CTxMemPool::txiter> CTxMemPool::GetIterVec(const std::vector<uint256>& txids) const
|
||||
std::vector<CTxMemPool::txiter> CTxMemPool::GetIterVec(const std::vector<Txid>& txids) const
|
||||
{
|
||||
AssertLockHeld(cs);
|
||||
std::vector<txiter> ret;
|
||||
ret.reserve(txids.size());
|
||||
for (const auto& txid : txids) {
|
||||
const auto it{GetIter(Txid::FromUint256(txid))};
|
||||
const auto it{GetIter(txid)};
|
||||
if (!it) return {};
|
||||
ret.push_back(*it);
|
||||
}
|
||||
@@ -1227,7 +1227,7 @@ void CTxMemPool::SetLoadTried(bool load_tried)
|
||||
m_load_tried = load_tried;
|
||||
}
|
||||
|
||||
std::vector<CTxMemPool::txiter> CTxMemPool::GatherClusters(const std::vector<uint256>& txids) const
|
||||
std::vector<CTxMemPool::txiter> CTxMemPool::GatherClusters(const std::vector<Txid>& txids) const
|
||||
{
|
||||
AssertLockHeld(cs);
|
||||
std::vector<txiter> clustered_txs{GetIterVec(txids)};
|
||||
|
||||
Reference in New Issue
Block a user