diff --git a/src/impl/dgb/coin/chain_walk_window.hpp b/src/impl/dgb/coin/chain_walk_window.hpp index de3ce9759..8327bb0c4 100644 --- a/src/impl/dgb/coin/chain_walk_window.hpp +++ b/src/impl/dgb/coin/chain_walk_window.hpp @@ -40,11 +40,14 @@ // // Per-coin isolation: dgb/ only. Header-only, additive, free functions over the // already-resolved (height, lookbehind) pair -- the get_chain skip-list walk -// stays in the forest. This slice does NOT rewire share_tracker.hpp; the four -// call sites keep their inline std::min/(actual<=0) guards. That byte-identity -// delegation is the follow-on (mirrors #414 redistribute rewire). The lifted -// body is a verbatim copy of the inline clamp (same int32_t height, same -// std::min, same <=0 comparison), so the follow-on is provably value-identical. +// stays in the forest. Delegation follow-on (mirrors #414 redistribute rewire): +// the two desired_version accessors -- get_desired_version_counts AND the +// consensus get_desired_version_weights (60%-by-work switch-gate input) -- now +// route their clamp through these helpers; get_average_stale_prop / +// get_stale_counts keep their inline std::min/(actual<=0) guards pending their +// own follow-on. The lifted body is a verbatim copy of the inline clamp (same +// int32_t height, same std::min, same <=0 comparison), proven value-identical by +// DgbChainWalkWindow.DelegationMatchesPreDelegationInline over a dense matrix. // Consensus-neutral: pure arithmetic, no value semantics changed. #include diff --git a/src/impl/dgb/share_tracker.hpp b/src/impl/dgb/share_tracker.hpp index f404945ef..94eb825f1 100644 --- a/src/impl/dgb/share_tracker.hpp +++ b/src/impl/dgb/share_tracker.hpp @@ -2168,8 +2168,8 @@ class ShareTracker if (!chain.contains(share_hash)) return {}; auto height = chain.get_height(share_hash); - auto actual = std::min(lookbehind, height); - if (actual <= 0) + auto actual = dgb::chain_walk_window_count(height, lookbehind); + if (!dgb::chain_walk_window_active(actual)) return {}; std::vector window;