Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: resolve a lot of sonarlint and clang-tidy warnings in llmq code #5773

Merged
merged 5 commits into from
Mar 23, 2024

Conversation

PastaPastaPasta
Copy link
Member

Issue being fixed or feature implemented

Resolve a lot of sonarlint and clang-tidy warnings. Please see individual commits

What was done?

How Has This Been Tested?

make check

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)

@PastaPastaPasta PastaPastaPasta added this to the 20.1 milestone Dec 17, 2023
@PastaPastaPasta PastaPastaPasta changed the title Refactor llmq2 refactor: resolve a lot of sonarlint and clang-tidy warnings in llmq code Dec 17, 2023
@PastaPastaPasta
Copy link
Member Author

Guix Automation has began to build this PR tagged as v20.1.0-devpr5773.f6123d42. A new comment will be made when the image is pushed.

@PastaPastaPasta
Copy link
Member Author

Guix Automation has completed; a release should be present here: https://github.com/dashpay/dash-dev-branches/releases/tag/v20.1.0-devpr5773.f6123d42. The image should be on dockerhub soon.

Copy link

@UdjinM6 UdjinM6 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unit tests crashed in CI

src/llmq/blockprocessor.cpp Outdated Show resolved Hide resolved
src/llmq/chainlocks.cpp Outdated Show resolved Hide resolved
src/llmq/instantsend.cpp Outdated Show resolved Hide resolved
@PastaPastaPasta
Copy link
Member Author

Guix Automation has failed due to the HEAD commit not being signed by an authorized core-team member. Please rebase and sign or push a new empty signed commit to allow Guix build to happen.

1 similar comment
@PastaPastaPasta
Copy link
Member Author

Guix Automation has failed due to the HEAD commit not being signed by an authorized core-team member. Please rebase and sign or push a new empty signed commit to allow Guix build to happen.

src/llmq/blockprocessor.cpp Outdated Show resolved Hide resolved
src/llmq/blockprocessor.cpp Outdated Show resolved Hide resolved

{
const bool relay = [&]() {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

smart :D I am always annoyed by passing variables out of LOCK scope

src/llmq/chainlocks.cpp Outdated Show resolved Hide resolved
src/llmq/chainlocks.h Outdated Show resolved Hide resolved
src/llmq/instantsend.cpp Outdated Show resolved Hide resolved
Copy link

This pull request has conflicts, please rebase.

Copy link

@UdjinM6 UdjinM6 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

utACK

for (auto& p : qcs) {
auto& qc = p.second;
for (auto& [_, qc2] : qcs) {
auto& qc = qc2; // cannot capture structured binding into lambda
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: could do 22e9655 instead

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Huh; interesting, but I think it's fine as is

Copy link
Collaborator

@knst knst left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 6d776a1

@PastaPastaPasta PastaPastaPasta merged commit 4301ab9 into dashpay:develop Mar 23, 2024
4 of 5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants