-
Notifications
You must be signed in to change notification settings - Fork 64
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
Simplifies the cln plugin option parsing #170
Conversation
a1bdf26
to
fba958a
Compare
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.
A couple of nits, all fine otherwise.
teos-common/src/net.rs
Outdated
} | ||
|
||
#[derive(Clone, Serialize, Debug, PartialEq, Eq)] | ||
|
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.
nit: an empty line here.
watchtower-plugin/src/main.rs
Outdated
if !host.starts_with("http") { | ||
host = format!("http://{}", host) | ||
} |
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.
nit: host
isn't quite the name for an HTTP url.
Also let's check .starts_with("http://")
because a host name might actually start with http
😆.
fba958a
to
ca8b8ed
Compare
Rebased and amended this so it pulls from master. I've also moved a bit more data to |
Options include helper functions to convert them to their proper type after `cln-plugin=0.1.2`. Use that to reduce the option parsing boilerplate. Also move all names, descriptions and default values for options, rpc_methods and hooks to a new file.
ca8b8ed
to
6920c9b
Compare
Looks like I've broken the plugin by doing this 😅, not exactly sure why though. |
`auto-retry-delay` was set to be u16, but its default value was beyond u16::MAX.
Fixed it, rust-teos/watchtower-plugin/src/main.rs Lines 544 to 547 in 07caee2
rust-teos/watchtower-plugin/src/main.rs Lines 625 to 629 in 07caee2
|
@sr-gi This panicked while checking if the retrier is idle. Guess the sleep time is too tight? |
That's my guess, unfortunately, I haven't been able to reproduce it locally |
Options include helper functions to convert them to their proper type after
cln-plugin=0.1.2
. Use that to reduce the option parsing boilerplate.Also move all names, descriptions and default values for options, rpc_methods and hooks
to a new file.