mirror of
https://github.com/lightningdevkit/rust-lightning.git
synced 2025-02-24 23:08:36 +01:00
Define ChannelTypeFeatures
methods for anchors logic.
Specifically, introduce a new constructor for an anchors- supporting feature set, as well as methods that will maintain forwards-compatible deserialization in older versions.
This commit is contained in:
parent
bf2218260e
commit
06a720fa7f
1 changed files with 9 additions and 0 deletions
|
@ -594,6 +594,15 @@ impl ChannelTypeFeatures {
|
|||
<sealed::ChannelTypeContext as sealed::StaticRemoteKey>::set_required_bit(&mut ret.flags);
|
||||
ret
|
||||
}
|
||||
|
||||
#[cfg(any(anchors, test))]
|
||||
/// Constructs a ChannelTypeFeatures with anchors support
|
||||
pub(crate) fn anchors_zero_htlc_fee_and_dependencies() -> Self {
|
||||
let mut ret = Self::empty();
|
||||
<sealed::ChannelTypeContext as sealed::StaticRemoteKey>::set_required_bit(&mut ret.flags);
|
||||
<sealed::ChannelTypeContext as sealed::AnchorsZeroFeeHtlcTx>::set_required_bit(&mut ret.flags);
|
||||
ret
|
||||
}
|
||||
}
|
||||
|
||||
impl ToBase32 for InvoiceFeatures {
|
||||
|
|
Loading…
Add table
Reference in a new issue