Skip to content

Commit 59c8f09

Browse files
committed
Add DualFundingChannelContext struct
1 parent d272a30 commit 59c8f09

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

2547+
/// Context for dual-funded channels.
2548+
#[cfg(dual_funding)]
2549+
pub(super) struct DualFundingChannelContext {
2550+
/// The amount in satoshis we will be contributing to the channel.
2551+
pub our_funding_satoshis: u64,
2552+
/// The amount in satoshis our counterparty will be contributing to the channel.
2553+
pub their_funding_satoshis: u64,
2554+
/// The funding transaction locktime suggested by the initiator. If set by us, it is always set
2555+
/// to the current block height to align incentives against fee-sniping.
2556+
pub funding_tx_locktime: u32,
2557+
/// The feerate set by the initiator to be used for the funding transaction.
2558+
pub funding_feerate_sat_per_1000_weight: u32,
2559+
}
2560+
25472561
// Holder designates channel data owned for the benefit of the user client.
25482562
// Counterparty designates channel data owned by the another channel participant entity.
25492563
pub(super) struct Channel<SP: Deref> where SP::Target: SignerProvider {

0 commit comments

Comments
 (0)