clusterlin: use 'cost' terminology instead of 'iters' (refactor)

This commit is contained in:
Pieter Wuille
2026-02-21 10:11:54 -05:00
committed by Pieter Wuille
parent 9e7129df29
commit ecc9a84f85
12 changed files with 111 additions and 91 deletions

View File

@@ -49,14 +49,13 @@ struct bilingual_str;
/** Fake height value used in Coin to signify they are only in the memory pool (since 0.8) */
static const uint32_t MEMPOOL_HEIGHT = 0x7FFFFFFF;
/** How many linearization iterations required for TxGraph clusters to have
* "acceptable" quality, if they cannot be optimally linearized with fewer
* iterations. */
static constexpr uint64_t ACCEPTABLE_ITERS = 1'700;
/** How much linearization cost required for TxGraph clusters to have
* "acceptable" quality, if they cannot be optimally linearized with less cost. */
static constexpr uint64_t ACCEPTABLE_COST = 1'700;
/** How much work we ask TxGraph to do after a mempool change occurs (either
* due to a changeset being applied, a new block being found, or a reorg). */
static constexpr uint64_t POST_CHANGE_WORK = 5 * ACCEPTABLE_ITERS;
static constexpr uint64_t POST_CHANGE_COST = 5 * ACCEPTABLE_COST;
/**
* Test whether the LockPoints height and time are still valid on the current chain