Skip to content

Commit cfc39d1

Browse files
committed
Add begin_interactive_funding_tx_construction()
1 parent d0d3692 commit cfc39d1

File tree

1 file changed

+50
-1
lines changed

1 file changed

+50
-1
lines changed

lightning/src/ln/channel.rs

Lines changed: 50 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2205,6 +2205,56 @@ impl<SP: Deref> PendingV2Channel<SP> where SP::Target: SignerProvider {
22052205
}
22062206
}
22072207

2208+
/*
2209+
impl<SP: Deref> InteractivelyFunded<SP> for OutboundV2Channel<SP> where SP::Target: SignerProvider {
2210+
fn context(&self) -> &ChannelContext<SP> {
2211+
&self.context
2212+
}
2213+
fn context_mut(&mut self) -> &mut ChannelContext<SP> {
2214+
&mut self.context
2215+
}
2216+
fn dual_funding_context(&self) -> &DualFundingChannelContext {
2217+
&self.dual_funding_context
2218+
}
2219+
fn dual_funding_context_mut(&mut self) -> &mut DualFundingChannelContext {
2220+
&mut self.dual_funding_context
2221+
}
2222+
fn unfunded_context(&self) -> &UnfundedChannelContext {
2223+
&self.unfunded_context
2224+
}
2225+
fn interactive_tx_constructor_mut(&mut self) -> &mut Option<InteractiveTxConstructor> {
2226+
&mut self.interactive_tx_constructor
2227+
}
2228+
fn is_initiator(&self) -> bool {
2229+
true
2230+
}
2231+
}
2232+
2233+
impl<SP: Deref> InteractivelyFunded<SP> for InboundV2Channel<SP> where SP::Target: SignerProvider {
2234+
fn context(&self) -> &ChannelContext<SP> {
2235+
&self.context
2236+
}
2237+
fn context_mut(&mut self) -> &mut ChannelContext<SP> {
2238+
&mut self.context
2239+
}
2240+
fn dual_funding_context(&self) -> &DualFundingChannelContext {
2241+
&self.dual_funding_context
2242+
}
2243+
fn dual_funding_context_mut(&mut self) -> &mut DualFundingChannelContext {
2244+
&mut self.dual_funding_context
2245+
}
2246+
fn unfunded_context(&self) -> &UnfundedChannelContext {
2247+
&self.unfunded_context
2248+
}
2249+
fn interactive_tx_constructor_mut(&mut self) -> &mut Option<InteractiveTxConstructor> {
2250+
&mut self.interactive_tx_constructor
2251+
}
2252+
fn is_initiator(&self) -> bool {
2253+
false
2254+
}
2255+
}
2256+
*/
2257+
22082258
impl<SP: Deref> ChannelContext<SP> where SP::Target: SignerProvider {
22092259
fn new_for_inbound_channel<'a, ES: Deref, F: Deref, L: Deref>(
22102260
fee_estimator: &'a LowerBoundedFeeEstimator<F>,
@@ -4591,7 +4641,6 @@ pub(super) struct DualFundingChannelContext {
45914641
/// The amount in satoshis we will be contributing to the channel.
45924642
pub our_funding_satoshis: u64,
45934643
/// The amount in satoshis our counterparty will be contributing to the channel.
4594-
#[allow(dead_code)] // TODO(dual_funding): Remove once contribution to V2 channels is enabled.
45954644
pub their_funding_satoshis: Option<u64>,
45964645
/// The funding transaction locktime suggested by the initiator. If set by us, it is always set
45974646
/// to the current block height to align incentives against fee-sniping.

0 commit comments

Comments
 (0)