mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-01-20 23:29:12 +01:00
Revert "Merge #19606: Backport wtxid relay to v0.20"
This reverts commita339289c2e, reversing changes made tob9ac31f2d2.
This commit is contained in:
@@ -724,12 +724,12 @@ void CTxMemPool::check(const CCoinsViewCache *pcoins) const
|
||||
assert(innerUsage == cachedInnerUsage);
|
||||
}
|
||||
|
||||
bool CTxMemPool::CompareDepthAndScore(const uint256& hasha, const uint256& hashb, bool wtxid)
|
||||
bool CTxMemPool::CompareDepthAndScore(const uint256& hasha, const uint256& hashb)
|
||||
{
|
||||
LOCK(cs);
|
||||
indexed_transaction_set::const_iterator i = wtxid ? get_iter_from_wtxid(hasha) : mapTx.find(hasha);
|
||||
indexed_transaction_set::const_iterator i = mapTx.find(hasha);
|
||||
if (i == mapTx.end()) return false;
|
||||
indexed_transaction_set::const_iterator j = wtxid ? get_iter_from_wtxid(hashb) : mapTx.find(hashb);
|
||||
indexed_transaction_set::const_iterator j = mapTx.find(hashb);
|
||||
if (j == mapTx.end()) return true;
|
||||
uint64_t counta = i->GetCountWithAncestors();
|
||||
uint64_t countb = j->GetCountWithAncestors();
|
||||
@@ -809,10 +809,10 @@ CTransactionRef CTxMemPool::get(const uint256& hash) const
|
||||
return i->GetSharedTx();
|
||||
}
|
||||
|
||||
TxMempoolInfo CTxMemPool::info(const uint256& hash, bool wtxid) const
|
||||
TxMempoolInfo CTxMemPool::info(const uint256& hash) const
|
||||
{
|
||||
LOCK(cs);
|
||||
indexed_transaction_set::const_iterator i = (wtxid ? get_iter_from_wtxid(hash) : mapTx.find(hash));
|
||||
indexed_transaction_set::const_iterator i = mapTx.find(hash);
|
||||
if (i == mapTx.end())
|
||||
return TxMempoolInfo();
|
||||
return GetInfo(i);
|
||||
@@ -915,8 +915,8 @@ bool CCoinsViewMemPool::GetCoin(const COutPoint &outpoint, Coin &coin) const {
|
||||
|
||||
size_t CTxMemPool::DynamicMemoryUsage() const {
|
||||
LOCK(cs);
|
||||
// Estimate the overhead of mapTx to be 15 pointers + an allocation, as no exact formula for boost::multi_index_contained is implemented.
|
||||
return memusage::MallocUsage(sizeof(CTxMemPoolEntry) + 15 * sizeof(void*)) * mapTx.size() + memusage::DynamicUsage(mapNextTx) + memusage::DynamicUsage(mapDeltas) + memusage::DynamicUsage(mapLinks) + memusage::DynamicUsage(vTxHashes) + cachedInnerUsage;
|
||||
// Estimate the overhead of mapTx to be 12 pointers + an allocation, as no exact formula for boost::multi_index_contained is implemented.
|
||||
return memusage::MallocUsage(sizeof(CTxMemPoolEntry) + 12 * sizeof(void*)) * mapTx.size() + memusage::DynamicUsage(mapNextTx) + memusage::DynamicUsage(mapDeltas) + memusage::DynamicUsage(mapLinks) + memusage::DynamicUsage(vTxHashes) + cachedInnerUsage;
|
||||
}
|
||||
|
||||
void CTxMemPool::RemoveStaged(setEntries &stage, bool updateDescendants, MemPoolRemovalReason reason) {
|
||||
|
||||
Reference in New Issue
Block a user