Skip to content

Commit 5e1a903

Browse files
committed
Add DualFundingChannelContext struct
1 parent 6ae240c commit 5e1a903

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

2309+
/// Context for dual-funded channels.
2310+
#[cfg(dual_funding)]
2311+
pub(super) struct DualFundingChannelContext {
2312+
/// The amount in satoshis we will be contributing to the channel.
2313+
pub our_funding_satoshis: u64,
2314+
/// The amount in satoshis our counterparty will be contributing to the channel.
2315+
pub their_funding_satoshis: u64,
2316+
/// The funding transaction locktime suggested by the initiator. If set by us, it is always set
2317+
/// to the current block height to align incentives against fee-sniping.
2318+
pub funding_tx_locktime: u32,
2319+
/// The feerate set by the initiator to be used for the funding transaction.
2320+
pub funding_feerate_sat_per_1000_weight: u32,
2321+
}
2322+
23092323
// Holder designates channel data owned for the benefit of the user client.
23102324
// Counterparty designates channel data owned by the another channel participant entity.
23112325
pub(super) struct Channel<SP: Deref> where SP::Target: SignerProvider {

0 commit comments

Comments
 (0)