-
Notifications
You must be signed in to change notification settings - Fork 87
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 FeeEstimator
to introduce local target variants
#352
Refactor FeeEstimator
to introduce local target variants
#352
Conversation
1930aad
to
a007882
Compare
ecfa9f6
to
cebf11b
Compare
ConfirmationTarget::OnchainPayment => 6, | ||
ConfirmationTarget::ChannelFunding => 12, |
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.
Seems like in practice the values are the same as before. Is this change to allow us to vary them in the future?
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.
Yes, I intentionally left the behavior unchanged for now. This is really only an overdue refactor and also prepares for the LDK upgrade where we'll get more ConfirmationTarget
s and in particular will split OnChainSweep
.
At some point in the future (probably when tackling #176), we'll revisit if the chosen defaults could be improved in any way, or if they are fine as is.
pub struct Wallet<D, B: Deref, E: Deref, L: Deref> | ||
pub(crate) struct Wallet<D, B: Deref, E: Deref, L: Deref> |
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.
Visibility control for Wallet
and WalletKeysManager
(below) seem unrelated to to the commits purpose.
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 thought so, too, but rustc
1.63 seemed to think otherwise (as the new FeeEstimator
is pub(crate)
, it complained that I couldn't leak a pub(crate)
trait in a pub struct
, nevermind that in fact the module itself is pub(crate)
). I now split the visibility changes out to their own commit though.
138bf61
to
9b1ea5a
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.
LGTM. Please squash.
.. previously we used LDK's `FeeEstimator` and `ConfirmationTarget` and ~misused some of the latter's variants for our non-Lightning operations. Here, we introduce our own `FeeEstimator` and `ConfirmationTarget` allowing to add specific variants for `ChannelFunding` and `OnchainPayment`s, for example.
9b1ea5a
to
42a695e
Compare
Squashed without further changes. |
.. previously we used LDK's
FeeEstimator
andConfirmationTarget
and ~misused some of the latter's variants for our non-Lightning operations.Here, we introduce our own
FeeEstimator
andConfirmationTarget
allowing to add specific variants forChannelFunding
andOnchainPayment
s, for example.(This is can also be viewed as a prefactor to #176, which we'll do as part of / after the upcoming rust-bitcoin/BDK upgrade)