-
Notifications
You must be signed in to change notification settings - Fork 901
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
Suggested code cleanup by TODO comment #4513
Suggested code cleanup by TODO comment #4513
Conversation
4920e97
to
1fdcf82
Compare
9373ebb
to
8746bbe
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good, just some minor comments on how we could make this even cleaner :-)
77a9e71
to
38b8bd3
Compare
38b8bd3
to
3258e75
Compare
cc1a7e7
to
caad17d
Compare
8a7a1aa
to
e290fb1
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM as is, my only nit would be to fold all the changes into a single, perfect commit.
b86c6c0
to
48f4770
Compare
@niftynei Rebased and fold all the commits in only one, sorry for the missing steps. I'm thinking, to put in the .gitignore the generated files like "wallet/db_postgres_sqlgen.c", but I'm not sure if I'm missing some important steps. Let's wait for Github actions 🪑 |
010b1f1
to
30bf4f6
Compare
This commit introduces the code cleanup suggested by the TODO comment in the code. Basically, it moves the code from the if-else statement to a switch statement without the default case. I used the basic idea of the code used in PR ElementsProject#4507. Changelog-Changed: None. Signed-off-by: Vincenzo Palazzo <[email protected]>
30bf4f6
to
ee98794
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ack ee98794
This PR
(it is not ready there is a new TODO, but I use this to check better the test with Github action)introduces a code cleanup suggested by the TODO comment in the code (I don't know from who, but I guess @cdecker ).Basically, it moves the code from the if-else statement to a switch statement without the default case. I used the basic idea of the code used in PR #4507.
I'm not sure that this code is better than the code before, also because I'm learning C, so this PR could be a big mistake
Signed-off-by: Vincenzo Palazzo [email protected]