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

config: add function to detect allow-deprecated-apis=false in CLN config #230

Merged
merged 3 commits into from
Sep 5, 2023

Conversation

grubles
Copy link
Collaborator

@grubles grubles commented Aug 30, 2023

This adds a function CheckForDeprecatedApiConfig() to clightning/config.go to check if allow-deprecated-apis is set to false in the CLN config. This is because setting that option false turns off deprecated, but not yet fully removed, API fields that PeerSwap may rely on. If we detect it is set false then we print a warning and exit the plugin to be safe.

Resolves #228

grubles and others added 2 commits August 31, 2023 12:43
It seems easier to understand and maintain to deserialize the config
into a tagged struct. This way, if we can not find the config, we wont
panic and have a default bool (false) that we can check.

Signed-off-by: Peter Neuroth <pet.v.ne@gmail.com>
@wtogami wtogami merged commit 8415c47 into ElementsProject:master Sep 5, 2023
6 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.

we should warn if CLN users set allow-deprecated-apis=false
3 participants