-
Notifications
You must be signed in to change notification settings - Fork 871
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
Fix CLN service startup failure by trimming trailing spaces in config parameters #7251
base: master
Are you sure you want to change the base?
Conversation
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.
Thanks for this, looks good to me
I was wondering if it is possible move this trim
function inside tal string https://github.com/rustyrussell/ccan/blob/master/ccan/tal/str/str.h
Do you mean to also change the function to use tal for allocating memory for the lines then? I thought it was not necessary since they were already allocated, but I can of course fix that if it is desirable. @vincenzopalazzo |
No I mean to have like |
Pardon me, but I don't fully understand what you mean. Could you elaborate on your suggestion? To my understanding, the |
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.
Nice PR! It's a neat solution to the problem. I agree with Vincenzo - so long as a ccan library is being modified, it would be nice to go ahead and trim the leading whitespace too and resize the buffer (which would make this a tal/str operation). It's not a significant difference in this case, but it could be more useful for the library. I'm okay with either approach.
Thanks for the comment @endothermicdev, I'll start doing a strtrim function in tal tomorrow if you both think that is more useful then 👍 |
a1f61f0
to
73363f8
Compare
@vincenzopalazzo & @endothermicdev , I've now changed to using |
e0cbfa2
to
3c829f0
Compare
@endothermicdev I am having some issues with tests on my local machine using |
3c829f0
to
22314d3
Compare
The local test I have tried is to add a space after a config varible in the |
82b03ea
to
c8b062d
Compare
Signed-off-by: Max Rantil <rantil@pm.me>
c8b062d
to
9504f5d
Compare
If someone could have a look at the pytest and tell me if something is wrong in it, that would be appreciated. |
fixes #7132
I would really appreciate some friendly feedback on this, as it is my first PR to the project and I might have misunderstood or missed important details.
I did find a similar functionstrip_trailing_whitespace
inplugins/bcli.c
, but from what I understand, havingvoid trim_trailing_spaces(char *str);
inccan
would still be beneficial, right?