mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-12-11 13:13:49 +01:00
[refactor] change Workspace::m_conflicts and adjacent funcs/structs to use Txid
It's preferable to use type-safe transaction identifiers to avoid confusing txid and wtxid. The next commit will add a reference to this set; we use this opportunity to change it to Txid ahead of time instead of adding new uses of uint256.
This commit is contained in:
@@ -454,7 +454,7 @@ void CTxMemPool::addUnchecked(const CTxMemPoolEntry &entry, setEntries &setAnces
|
||||
cachedInnerUsage += entry.DynamicMemoryUsage();
|
||||
|
||||
const CTransaction& tx = newit->GetTx();
|
||||
std::set<uint256> setParentTransactions;
|
||||
std::set<Txid> setParentTransactions;
|
||||
for (unsigned int i = 0; i < tx.vin.size(); i++) {
|
||||
mapNextTx.insert(std::make_pair(&tx.vin[i].prevout, &tx));
|
||||
setParentTransactions.insert(tx.vin[i].prevout.hash);
|
||||
@@ -969,7 +969,7 @@ std::optional<CTxMemPool::txiter> CTxMemPool::GetIter(const uint256& txid) const
|
||||
return std::nullopt;
|
||||
}
|
||||
|
||||
CTxMemPool::setEntries CTxMemPool::GetIterSet(const std::set<uint256>& hashes) const
|
||||
CTxMemPool::setEntries CTxMemPool::GetIterSet(const std::set<Txid>& hashes) const
|
||||
{
|
||||
CTxMemPool::setEntries ret;
|
||||
for (const auto& h : hashes) {
|
||||
|
||||
Reference in New Issue
Block a user