Merge #5959: refactor: add a default for CopyNodeVector(cond)

544348f8ff refactor: add a default for CopyNodeVector(cond) (pasta)

Pull request description:

  ## Issue being fixed or feature implemented
  This is a custom function in the dash codebase; remove it and use default arg instead

  ## What was done?

  ## How Has This Been Tested?
  Building

  ## Breaking Changes
  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
  - [x] I have assigned this pull request to a milestone _(for repository code-owners and collaborators only)_

Top commit has no ACKs.

Tree-SHA512: 9a7854436ed8c068c602ad4c87dc7b792fdbc3d37dad4749758bf3b052814b6d2e0051dab7f2bd13df860ee9ac9678738c5d2c3b2058829fde84c2b2e219da76
This commit is contained in:
pasta 2024-04-02 09:38:30 -05:00
commit cede44d94b
No known key found for this signature in database
GPG Key ID: 52527BEDABE87984
2 changed files with 1 additions and 7 deletions

View File

@ -4160,11 +4160,6 @@ std::vector<CNode*> CConnman::CopyNodeVector(std::function<bool(const CNode* pno
return vecNodesCopy;
}
std::vector<CNode*> CConnman::CopyNodeVector()
{
return CopyNodeVector(AllNodes);
}
void CConnman::ReleaseNodeVector(const std::vector<CNode*>& vecNodes)
{
for(size_t i = 0; i < vecNodes.size(); ++i) {

View File

@ -1173,8 +1173,7 @@ public:
ForEachNodeThen(FullyConnectedOnly, pre, post);
}
std::vector<CNode*> CopyNodeVector(std::function<bool(const CNode* pnode)> cond);
std::vector<CNode*> CopyNodeVector();
std::vector<CNode*> CopyNodeVector(std::function<bool(const CNode* pnode)> cond = AllNodes);
void ReleaseNodeVector(const std::vector<CNode*>& vecNodes);
void RelayTransaction(const CTransaction& tx, const bool is_dstx);