lightning
lightning copied to clipboard
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?