-
Notifications
You must be signed in to change notification settings - Fork 72
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
Refactor ChannelConfig
/ MaxDustHTLCExposure
#350
Refactor ChannelConfig
/ MaxDustHTLCExposure
#350
Conversation
1ff6d08
to
7ba4abc
Compare
src/types.rs
Outdated
/// This sets a fixed limit on the total dust exposure in millisatoshis. | ||
/// | ||
/// Please refer to [`LdkMaxDustHTLCExposure`] for further details. | ||
FixedLimitMsat { |
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.
Do we need to duplicate the units here?
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.
You mean I could drop the Msat
part? I guess so, now added a fixup.
/// Please refer to [`LdkMaxDustHTLCExposure`] for further details. | ||
FeeRateMultiplier { | ||
/// The applied fee rate multiplier. | ||
multiplier: u64, |
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.
Should we include the units _sats_per_kw
?
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.
I don't think so, a multiplier is unitless?
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.
Now added a fixup dropping the (in sats/KW)
from the comment as IMO it's misleading (the feerate has a unit, but it doesn't matter which one, the multiplier is just a multiplier.
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.
Yeah, thanks I misread that
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.
LGTM. Please squash.
Previously, we chose to expose `ChannelConfig` as a Uniffi `interface`, providing accessor methods. Unfortunately this forced us to `Arc` it everywhere in the API, and also didn't allow to retrieve the currently set dust exposure limits. Here, we refactor our version of `ChannelConfig` to be a normal `struct` (Uniffi `dictionary`), and only expose the `MaxDustHTLCExposure` as an enum-`interface`.
5695195
to
09d68ee
Compare
Squashed without further changes. |
Closes #349.
Previously, we chose to expose
ChannelConfig
as a Uniffiinterface
, providing accessor methods. Unfortunately this forced us toArc
it everywhere in the API, and also didn't allow to retrieve the currently set dust exposure limits. Here, we refactor our version ofChannelConfig
to be a normalstruct
(Uniffidictionary
), and only expose theMaxDustHTLCExposure
as an enum-interface
.