-
Notifications
You must be signed in to change notification settings - Fork 902
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
cln-plugin: Required ConfigOption with no default #5274
Comments
This is exactly how the grpc plugin works, if the option is missed, you can disabled the plugin lightning/plugins/grpc-plugin/src/main.rs Lines 44 to 65 in c7d359b
But this can be an idea to have not a library level but a lightningd level, that can avoid running the plugin if there is not enough info to run it! This make also the plugin lifecycle easier! |
If we want plugins to be self-contained, at the minimum Now, the general directive is that all your heavy initialization should occur on the |
Oh you have right @ZmnSCPxj I think the actual solution is the more convenient one |
Closed by #5369 |
I need to write a c-lightning plugin that takes a command line argument to a config file. This config is required -- the plugin cannot work without it -- and at this point there isn't a default location for it.
Right now I just set a default value to "default-do-not-use" or something like that and panic if that's still the value after initialization. But it might be nice if the library supported this kind of required argument without a default.
(Or maybe I just need to figure out a default location for my plugin config!)
The text was updated successfully, but these errors were encountered: