Skip to content

Commit f8ad478

Browse files
committed
Add DualFundingChannelContext struct
1 parent 6e45d17 commit f8ad478

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
@@ -2874,6 +2874,20 @@ pub(crate) fn commit_tx_fee_msat(feerate_per_kw: u32, num_htlcs: usize, channel_
28742874
(commitment_tx_base_weight(channel_type_features) + num_htlcs as u64 * COMMITMENT_TX_WEIGHT_PER_HTLC) * feerate_per_kw as u64 / 1000 * 1000
28752875
}
28762876

2877+
/// Context for dual-funded channels.
2878+
#[cfg(dual_funding)]
2879+
pub(super) struct DualFundingChannelContext {
2880+
/// The amount in satoshis we will be contributing to the channel.
2881+
pub our_funding_satoshis: u64,
2882+
/// The amount in satoshis our counterparty will be contributing to the channel.
2883+
pub their_funding_satoshis: u64,
2884+
/// The funding transaction locktime suggested by the initiator. If set by us, it is always set
2885+
/// to the current block height to align incentives against fee-sniping.
2886+
pub funding_tx_locktime: u32,
2887+
/// The feerate set by the initiator to be used for the funding transaction.
2888+
pub funding_feerate_sat_per_1000_weight: u32,
2889+
}
2890+
28772891
// Holder designates channel data owned for the benefit of the user client.
28782892
// Counterparty designates channel data owned by the another channel participant entity.
28792893
pub(super) struct Channel<SP: Deref> where SP::Target: SignerProvider {

0 commit comments

Comments
 (0)