Minor issue/question: Trailing spaces in Config file parameter make CLN fail to start
Issue
I recently updated my config file and there were a couple of trailing spaces at the end of the line that I didn't notice. I didn't need the changes right away so I didn't restart CLN after modifying the config file. Today I finally had to restart CLN service and it kept failing. I did change Bitcoin to Bitcoin Knots and I thought that could be the reason and it took me awhile before realizing that the problem wasn't Knots but the change I made to the config file few weeks ago... When I finally decided to try and run it form the CLI instead than through systemctl I saw this message and I could fixed the issue:
lightningd: Config file /mnt/md0/C-Lightning/config line 24: autoclean-failedforwards-age=1296000 : '1296000 ' is not a number
So the question/proposal is: wouldn't be better to try and remove any trailing spaces from the parameters when reading the configuration file? Or at least have some warnings showing up in the systemctl status output (if it is even possible) other than a generic failure?
looks like the value 1296000 is dirty and core lightning is taking it as a string, do you have any white space after the 1296000?
looks like the value
1296000is dirty and core lightning is taking it as a string, do you have any white space after the 1296000?
Yes that's what happened and why I was proposing an improvement:
So the question/proposal is: wouldn't be better to try and remove any trailing spaces from the parameters when reading the configuration file? Or at least have some warnings showing up in the systemctl status output (if it is even possible) other than a generic failure?
Sorry miss you suggestion, could be a good option IMHO, so marking this issue as a good first issue
Is this issue up for grabs ?
Hello, I was curious if this issue was up for grabs? If so, could you possibly assign this issue to me?
You can go with this issue without be assigned, just feel free to open a PR @srikanth-iyengar @DreadPirate07
@srikanth-iyengar @DreadPirate07 share a Sphinx Chat profile with Core Lightning and we can look to throw some bounty your way!
https://community.sphinx.chat/bounty/1747
That's interesting
I would work upon this issue. Can I get some more info regarding this issue?
@BitcoinJiuJitsu looks like this issue has been fixed and closed, but the Sphinx bounty is still active, FYI...
https://community.sphinx.chat/p/clt2n32tu2rjujq1jn6g/bounties/1747/8