Skip to content

Commit 7980b3d

Browse files
committed
Add DualFundingChannelContext struct
1 parent 90453ed commit 7980b3d

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

lightning/src/ln/channel.rs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2522,6 +2522,20 @@ pub(crate) fn commit_tx_fee_msat(feerate_per_kw: u32, num_htlcs: usize, channel_
25222522
(commitment_tx_base_weight(channel_type_features) + num_htlcs as u64 * COMMITMENT_TX_WEIGHT_PER_HTLC) * feerate_per_kw as u64 / 1000 * 1000
25232523
}
25242524

2525+
/// Context for dual-funded channels.
2526+
#[cfg(dual_funding)]
2527+
pub(super) struct DualFundingChannelContext {
2528+
/// The amount in satoshis we will be contributing to the channel.
2529+
pub our_funding_satoshis: u64,
2530+
/// The amount in satoshis our counterparty will be contributing to the channel.
2531+
pub their_funding_satoshis: u64,
2532+
/// The funding transaction locktime suggested by the initiator. If set by us, it is always set
2533+
/// to the current block height to align incentives against fee-sniping.
2534+
pub funding_tx_locktime: u32,
2535+
/// The feerate set by the initiator to be used for the funding transaction.
2536+
pub funding_feerate_sat_per_1000_weight: u32,
2537+
}
2538+
25252539
// Holder designates channel data owned for the benefit of the user client.
25262540
// Counterparty designates channel data owned by the another channel participant entity.
25272541
pub(super) struct Channel<SP: Deref> where SP::Target: SignerProvider {

0 commit comments

Comments
 (0)