mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-16 13:01:19 +02:00
Merge 08e2947312 into merged_master (Bitcoin PR #17316)
This commit is contained in:
commit
9d15047222
5 changed files with 14 additions and 14 deletions
|
|
@ -8,6 +8,7 @@
|
|||
#include <consensus/consensus.h>
|
||||
#include <consensus/tx_verify.h>
|
||||
#include <consensus/validation.h>
|
||||
#include <optional.h>
|
||||
#include <validation.h>
|
||||
#include <policy/policy.h>
|
||||
#include <policy/fees.h>
|
||||
|
|
@ -158,7 +159,7 @@ bool CTxMemPool::CalculateMemPoolAncestors(const CTxMemPoolEntry &entry, setEntr
|
|||
// GetMemPoolParents() is only valid for entries in the mempool, so we
|
||||
// iterate mapTx to find parents.
|
||||
for (unsigned int i = 0; i < tx.vin.size(); i++) {
|
||||
boost::optional<txiter> piter = GetIter(tx.vin[i].prevout.hash);
|
||||
Optional<txiter> piter = GetIter(tx.vin[i].prevout.hash);
|
||||
if (piter) {
|
||||
parentHashes.insert(*piter);
|
||||
if (parentHashes.size() + 1 > limitAncestorCount) {
|
||||
|
|
@ -937,11 +938,11 @@ const CTransaction* CTxMemPool::GetConflictTx(const COutPoint& prevout) const
|
|||
return it == mapNextTx.end() ? nullptr : it->second;
|
||||
}
|
||||
|
||||
boost::optional<CTxMemPool::txiter> CTxMemPool::GetIter(const uint256& txid) const
|
||||
Optional<CTxMemPool::txiter> CTxMemPool::GetIter(const uint256& txid) const
|
||||
{
|
||||
auto it = mapTx.find(txid);
|
||||
if (it != mapTx.end()) return it;
|
||||
return boost::optional<txiter>{};
|
||||
return Optional<txiter>{};
|
||||
}
|
||||
|
||||
CTxMemPool::setEntries CTxMemPool::GetIterSet(const std::set<uint256>& hashes) const
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue