mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-06-06 03:02:37 +02:00
txgraph: Add CountDistinctClusters function (feature)
This commit is contained in:
@@ -149,6 +149,11 @@ public:
|
||||
/** Compare two transactions according to their order in the main graph. Both transactions must
|
||||
* be in the main graph. The main graph must not be oversized. */
|
||||
virtual std::strong_ordering CompareMainOrder(const Ref& a, const Ref& b) noexcept = 0;
|
||||
/** Count the number of distinct clusters that the specified transactions belong to. If
|
||||
* main_only is false and a staging graph exists, staging clusters are counted. Otherwise,
|
||||
* main clusters are counted. Refs that do not exist in the queried graph are ignored. The
|
||||
* queried graph must not be oversized. */
|
||||
virtual GraphIndex CountDistinctClusters(std::span<const Ref* const>, bool main_only = false) noexcept = 0;
|
||||
|
||||
/** Perform an internal consistency check on this object. */
|
||||
virtual void SanityCheck() const = 0;
|
||||
|
||||
Reference in New Issue
Block a user