refactor: actually move out of previousQuarters.quarterHMinus*C and newQuarterMembers into quorumMembers

This commit is contained in:
pasta 2024-03-04 00:38:41 -06:00
parent a59c91c6dc
commit a701a8d5c9
No known key found for this signature in database
GPG Key ID: 52527BEDABE87984

View File

@ -243,18 +243,11 @@ std::vector<std::vector<CDeterministicMNCPtr>> ComputeQuorumMembersByQuarterRota
} }
for (const size_t i : irange::range(nQuorums)) { for (const size_t i : irange::range(nQuorums)) {
for (const auto &m: previousQuarters.quarterHMinus3C[i]) { // Move elements from previous quarters into quorumMembers
quorumMembers[i].push_back(std::move(m)); std::move(previousQuarters.quarterHMinus3C[i].begin(), previousQuarters.quarterHMinus3C[i].end(), std::back_inserter(quorumMembers[i]));
} std::move(previousQuarters.quarterHMinus2C[i].begin(), previousQuarters.quarterHMinus2C[i].end(), std::back_inserter(quorumMembers[i]));
for (const auto &m: previousQuarters.quarterHMinus2C[i]) { std::move(previousQuarters.quarterHMinusC[i].begin(), previousQuarters.quarterHMinusC[i].end(), std::back_inserter(quorumMembers[i]));
quorumMembers[i].push_back(std::move(m)); std::move(newQuarterMembers[i].begin(), newQuarterMembers[i].end(), std::back_inserter(quorumMembers[i]));
}
for (const auto &m: previousQuarters.quarterHMinusC[i]) {
quorumMembers[i].push_back(std::move(m));
}
for (const auto &m: newQuarterMembers[i]) {
quorumMembers[i].push_back(std::move(m));
}
if (LogAcceptCategory(BCLog::LLMQ)) { if (LogAcceptCategory(BCLog::LLMQ)) {
std::stringstream ss; std::stringstream ss;