Skip to content

Commit bb81598

Browse files
committed
Add interactive tx constructor to all V2-related channel structs
Here we add the `interactive_tx_constructor` field to the `Channel`, `OutboundV2Channel`, and `InboundV2Channel` structs.
1 parent 7e23afc commit bb81598

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

lightning/src/ln/channel.rs

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ use bitcoin::secp256k1;
2828
use crate::ln::types::ChannelId;
2929
use crate::types::payment::{PaymentPreimage, PaymentHash};
3030
use crate::types::features::{ChannelTypeFeatures, InitFeatures};
31+
use crate::ln::interactivetxs::InteractiveTxConstructor;
3132
use crate::ln::msgs;
3233
use crate::ln::msgs::{ClosingSigned, ClosingSignedFeeRange, DecodeError};
3334
use crate::ln::script::{self, ShutdownScript};
@@ -8132,7 +8133,7 @@ impl<SP: Deref> InboundV1Channel<SP> where SP::Target: SignerProvider {
81328133
msg.push_msat,
81338134
msg.common_fields.clone(),
81348135
)?,
8135-
unfunded_context: UnfundedChannelContext { unfunded_channel_age_ticks: 0 }
8136+
unfunded_context: UnfundedChannelContext { unfunded_channel_age_ticks: 0 },
81368137
};
81378138
Ok(chan)
81388139
}
@@ -8266,6 +8267,8 @@ pub(super) struct OutboundV2Channel<SP: Deref> where SP::Target: SignerProvider
82668267
pub context: ChannelContext<SP>,
82678268
pub unfunded_context: UnfundedChannelContext,
82688269
pub dual_funding_context: DualFundingChannelContext,
8270+
/// The current interactive transaction construction session under negotiation.
8271+
interactive_tx_constructor: Option<InteractiveTxConstructor>,
82698272
}
82708273

82718274
impl<SP: Deref> OutboundV2Channel<SP> where SP::Target: SignerProvider {
@@ -8317,7 +8320,8 @@ impl<SP: Deref> OutboundV2Channel<SP> where SP::Target: SignerProvider {
83178320
their_funding_satoshis: 0,
83188321
funding_tx_locktime,
83198322
funding_feerate_sat_per_1000_weight,
8320-
}
8323+
},
8324+
interactive_tx_constructor: None,
83218325
};
83228326
Ok(chan)
83238327
}
@@ -8391,6 +8395,8 @@ pub(super) struct InboundV2Channel<SP: Deref> where SP::Target: SignerProvider {
83918395
pub context: ChannelContext<SP>,
83928396
pub unfunded_context: UnfundedChannelContext,
83938397
pub dual_funding_context: DualFundingChannelContext,
8398+
/// The current interactive transaction construction session under negotiation.
8399+
interactive_tx_constructor: Option<InteractiveTxConstructor>,
83948400
}
83958401

83968402
impl<SP: Deref> InboundV2Channel<SP> where SP::Target: SignerProvider {
@@ -8462,7 +8468,8 @@ impl<SP: Deref> InboundV2Channel<SP> where SP::Target: SignerProvider {
84628468
their_funding_satoshis: msg.common_fields.funding_satoshis,
84638469
funding_tx_locktime: msg.locktime,
84648470
funding_feerate_sat_per_1000_weight: msg.funding_feerate_sat_per_1000_weight,
8465-
}
8471+
},
8472+
interactive_tx_constructor: None,
84668473
};
84678474

84688475
Ok(chan)

0 commit comments

Comments
 (0)