Skip to content

Commit 8c1a383

Browse files
committed
fixup! Expose per-channel features in ChannelDetails
move FFI InitFeatures to correct file
1 parent 219b738 commit 8c1a383

2 files changed

Lines changed: 9 additions & 7 deletions

File tree

src/ffi/types.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@ pub use lightning_liquidity::lsps0::ser::LSPSDateTime;
4343
pub use lightning_liquidity::lsps1::msgs::{
4444
LSPS1ChannelInfo, LSPS1OrderId, LSPS1OrderParams, LSPS1PaymentState,
4545
};
46+
#[cfg(feature = "uniffi")]
47+
use lightning_types::features::InitFeatures;
4648
pub use lightning_types::payment::{PaymentHash, PaymentPreimage, PaymentSecret};
4749
pub use lightning_types::string::UntrustedString;
4850
use vss_client::headers::{
@@ -1496,6 +1498,13 @@ pub enum ClosureReason {
14961498
},
14971499
}
14981500

1501+
#[cfg(feature = "uniffi")]
1502+
uniffi::custom_type!(InitFeatures, Vec<u8>, {
1503+
remote,
1504+
try_lift: |val| Ok(InitFeatures::from_le_bytes(val)),
1505+
lower: |obj| obj.le_flags().to_vec(),
1506+
});
1507+
14991508
#[cfg(test)]
15001509
mod tests {
15011510
use std::num::NonZeroU64;

src/types.rs

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -361,13 +361,6 @@ pub struct CounterpartyForwardingInfo {
361361
pub cltv_expiry_delta: u16,
362362
}
363363

364-
#[cfg(feature = "uniffi")]
365-
uniffi::custom_type!(InitFeatures, Vec<u8>, {
366-
remote,
367-
try_lift: |val| Ok(InitFeatures::from_le_bytes(val)),
368-
lower: |obj| obj.le_flags().to_vec(),
369-
});
370-
371364
/// Channel parameters which apply to our counterparty. These are split out from [`ChannelDetails`]
372365
/// to better separate parameters.
373366
#[derive(Clone, Debug, PartialEq)]

0 commit comments

Comments
 (0)