diff --git a/src/evo/deterministicmns.cpp b/src/evo/deterministicmns.cpp index b35dab60a9..b75c1403c2 100644 --- a/src/evo/deterministicmns.cpp +++ b/src/evo/deterministicmns.cpp @@ -215,7 +215,9 @@ std::vector CDeterministicMNList::GetProjectedMNPayees(gsl if (nCount < 0 ) { return {}; } - const auto weighted_count = GetValidWeightedMNsCount(); + const bool isMNRewardReallocation = DeploymentActiveAfter(pindexPrev, Params().GetConsensus(), + Consensus::DEPLOYMENT_MN_RR); + const auto weighted_count = isMNRewardReallocation ? GetValidMNsCount() : GetValidWeightedMNsCount(); nCount = std::min(nCount, int(weighted_count)); std::vector result; @@ -223,7 +225,6 @@ std::vector CDeterministicMNList::GetProjectedMNPayees(gsl int remaining_evo_payments{0}; CDeterministicMNCPtr evo_to_be_skipped{nullptr}; - const bool isMNRewardReallocation{DeploymentActiveAfter(pindexPrev, Params().GetConsensus(), Consensus::DEPLOYMENT_MN_RR)}; if (!isMNRewardReallocation) { ForEachMNShared(true, [&](const CDeterministicMNCPtr& dmn) { if (dmn->pdmnState->nLastPaidHeight == nHeight) { @@ -242,7 +243,7 @@ std::vector CDeterministicMNList::GetProjectedMNPayees(gsl ForEachMNShared(true, [&](const CDeterministicMNCPtr& dmn) { if (dmn == evo_to_be_skipped) return; - for ([[maybe_unused]] auto _ : irange::range(GetMnType(dmn->nType).voting_weight)) { + for ([[maybe_unused]] auto _ : irange::range(isMNRewardReallocation ? 1 : GetMnType(dmn->nType).voting_weight)) { result.emplace_back(dmn); } });