Pieter Wuille
Pieter Wuille
Added an additional inspector function: * `CountDistinctClusters`, which efficiently counts how many distinct clusters a list of specified Refs belong to, for helping with enforcing RBF cluster policy limits.
I split out two optimizations to `TxGraphImpl::GroupClusters()` from the initial commit into their own commits.
A suggestion for simplifying the removed/destroyed/unlinked/cleanup interface. * Unlinking *only* happens when the calling code destroys a `Ref`. Currently, unlinking can happen either through `Ref` destruction, or through `TxGraph::Cleanup()` (which...
@instagibbs Right. Though "removed/exists" is really a per-graph (main vs staging) thing, while destroyed+unlinked are TxGraph-wide. Maybe it should not be called `GetRemoved()`, as that term is ambiguous. How about...
Actually, having this `GetUnusedRefs()` is pretty annoying (read: would require extra per-transaction memory) to be efficiently implementable, and talking to @sdaftuar it does not seem important if `Trim()` can report...
Some changes: * `Cleanup` is gone. Compaction now happens automatically and transparently, but the caller is responsible for destroying `Refs` when they are no longer needed. * Avoid re-`Group`-ing when...
* Split out a memory optimization in `GroupClusters` to its own commit. * Moved caching of oversizedness to its own commit.
* Remove the `TxGraph::Ref::operator bool()`; it has little use now that cleanup is implicit. * Add assertion that cluster count limit is at least 1. * Modify fuzz test to...
* Introduce vsize and weight tagged versions of FeeFrac, to avoid accidental type confusion. * Convert all of txgraph to work using FeePerWeight, rather than bare FeeFrac.
Changed: * Added `GetAncestorsUnion` and `GetDescendantsUnion`, which act like their non-union version, but take in a span of multiple `Ref*`, and return the `Ref*` for the union of their ancestors/descendants...