Merge #5918: refactor: actually move out of previousQuarters.quarterHMinus*C and nquorumMembers

a701a8d5c9 refactor: actually move out of previousQuarters.quarterHMinus*C and newQuarterMembers into quorumMembers (pasta)

Pull request description:

  ## Issue being fixed or feature implemented
  we use std::move; but it doesn't actually move

  ## What was done?
  refactor in order to actually move

  ## How Has This Been Tested?
  Waiting for CI / tests; built locally + unit tests

  ## Breaking Changes
  Should be none

  ## Checklist:
    _Go over all the following points, and put an `x` in all the boxes that apply._
  - [ ] I have performed a self-review of my own code
  - [ ] I have commented my code, particularly in hard-to-understand areas
  - [ ] I have added or updated relevant unit/integration/functional/e2e tests
  - [ ] I have made corresponding changes to the documentation
  - [ ] I have assigned this pull request to a milestone _(for repository code-owners and collaborators only)_

Top commit has no ACKs.

Tree-SHA512: ff2065724aaa1f1c5b29bd56dc005fd95f8c28ea813af10de20ae1c07810e2e73f72d676fa5b1c353db32ee499b8351035c0a252a16bd6f182da1c1d5479bea9
This commit is contained in:
pasta 2024-03-04 09:02:20 -06:00
commit 39c1778add
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 auto &m: previousQuarters.quarterHMinus3C[i]) {
quorumMembers[i].push_back(std::move(m));
}
for (const auto &m: previousQuarters.quarterHMinus2C[i]) {
quorumMembers[i].push_back(std::move(m));
}
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));
}
// Move elements from previous quarters into quorumMembers
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]));
std::move(previousQuarters.quarterHMinusC[i].begin(), previousQuarters.quarterHMinusC[i].end(), std::back_inserter(quorumMembers[i]));
std::move(newQuarterMembers[i].begin(), newQuarterMembers[i].end(), std::back_inserter(quorumMembers[i]));
if (LogAcceptCategory(BCLog::LLMQ)) {
std::stringstream ss;