Skip to content

Commit 407bade

Browse files
committed
Add DualFundingChannelContext struct
1 parent 10a4c3d commit 407bade

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

2299+
/// Context for dual-funded channels.
2300+
#[cfg(dual_funding)]
2301+
pub(super) struct DualFundingChannelContext {
2302+
/// The amount in satoshis we will be contributing to the channel.
2303+
pub our_funding_satoshis: u64,
2304+
/// The amount in satoshis our counterparty will be contributing to the channel.
2305+
pub their_funding_satoshis: u64,
2306+
/// The funding transaction locktime suggested by the initiator. If set by us, it is always set
2307+
/// to the current block height to align incentives against fee-sniping.
2308+
pub funding_tx_locktime: u32,
2309+
/// The feerate set by the initiator to be used for the funding transaction.
2310+
pub funding_feerate_sat_per_1000_weight: u32,
2311+
}
2312+
22992313
// Holder designates channel data owned for the benefit of the user client.
23002314
// Counterparty designates channel data owned by the another channel participant entity.
23012315
pub(super) struct Channel<SP: Deref> where SP::Target: SignerProvider {

0 commit comments

Comments
 (0)