MCPcopy Create free account
hub / github.com/bitcoin/bitcoin / SetTransactionFee

Method SetTransactionFee

src/txgraph.cpp:2746–2760  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2744}
2745
2746void TxGraphImpl::SetTransactionFee(const Ref& ref, int64_t fee) noexcept
2747{
2748 // Don't do anything if the passed Ref is empty.
2749 if (GetRefGraph(ref) == nullptr) return;
2750 Assume(GetRefGraph(ref) == this);
2751 Assume(m_main_chunkindex_observers == 0);
2752 // Find the entry, its locator, and inform its Cluster about the new feerate, if any.
2753 auto& entry = m_entries[GetRefIndex(ref)];
2754 for (int level = 0; level < MAX_LEVELS; ++level) {
2755 auto& locator = entry.m_locator[level];
2756 if (locator.IsPresent()) {
2757 locator.cluster->SetFee(*this, level, locator.index, fee);
2758 }
2759 }
2760}
2761
2762std::strong_ordering TxGraphImpl::CompareMainOrder(const Ref& a, const Ref& b) noexcept
2763{

Callers 2

PrioritiseTransactionMethod · 0.45
StageAdditionMethod · 0.45

Calls 2

IsPresentMethod · 0.80
SetFeeMethod · 0.80

Tested by

no test coverage detected