mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-14 12:43:40 +02:00
Merge 6a560aceb7 into merged_master (Bitcoin PR bitcoin/bitcoin#27803)
This commit is contained in:
commit
e2a4635a44
1 changed files with 6 additions and 1 deletions
|
|
@ -346,15 +346,20 @@ std::optional<CAmount> MiniMiner::CalculateTotalBumpFees(const CFeeRate& target_
|
|||
to_process.insert(iter);
|
||||
ancestors.insert(iter);
|
||||
}
|
||||
|
||||
std::set<uint256> has_been_processed;
|
||||
while (!to_process.empty()) {
|
||||
auto iter = to_process.begin();
|
||||
const CTransaction& tx = (*iter)->second.GetTx();
|
||||
for (const auto& input : tx.vin) {
|
||||
if (auto parent_it{m_entries_by_txid.find(input.prevout.hash)}; parent_it != m_entries_by_txid.end()) {
|
||||
to_process.insert(parent_it);
|
||||
if (!has_been_processed.count(input.prevout.hash)) {
|
||||
to_process.insert(parent_it);
|
||||
}
|
||||
ancestors.insert(parent_it);
|
||||
}
|
||||
}
|
||||
has_been_processed.insert(tx.GetHash());
|
||||
to_process.erase(iter);
|
||||
}
|
||||
const auto ancestor_package_size = std::accumulate(ancestors.cbegin(), ancestors.cend(), int64_t{0},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue