Skip to content

Commit e229dac

Browse files
committed
Introduce InteractiveTxSigningSession for signing interactively constructed txs
1 parent f999414 commit e229dac

File tree

3 files changed

+302
-36
lines changed

3 files changed

+302
-36
lines changed

lightning/src/ln/channel.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8563,7 +8563,7 @@ impl<SP: Deref> InboundV2Channel<SP> where SP::Target: SignerProvider {
85638563
/// Assumes chain_hash has already been checked and corresponds with what we expect!
85648564
pub fn new<ES: Deref, F: Deref, L: Deref>(
85658565
fee_estimator: &LowerBoundedFeeEstimator<F>, entropy_source: &ES, signer_provider: &SP,
8566-
counterparty_node_id: PublicKey, our_supported_features: &ChannelTypeFeatures,
8566+
holder_node_id: PublicKey, counterparty_node_id: PublicKey, our_supported_features: &ChannelTypeFeatures,
85678567
their_features: &InitFeatures, msg: &msgs::OpenChannelV2,
85688568
funding_inputs: Vec<(TxIn, TransactionU16LenLimited)>, user_id: u128, config: &UserConfig,
85698569
current_chain_height: u32, logger: &L,
@@ -8639,6 +8639,8 @@ impl<SP: Deref> InboundV2Channel<SP> where SP::Target: SignerProvider {
86398639
let interactive_tx_constructor = Some(InteractiveTxConstructor::new(
86408640
InteractiveTxConstructorArgs {
86418641
entropy_source,
8642+
holder_node_id,
8643+
counterparty_node_id,
86428644
channel_id: context.channel_id,
86438645
feerate_sat_per_kw: dual_funding_context.funding_feerate_sat_per_1000_weight,
86448646
funding_tx_locktime: dual_funding_context.funding_tx_locktime,

lightning/src/ln/channelmanager.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7638,7 +7638,7 @@ where
76387638
},
76397639
OpenChannelMessage::V2(open_channel_msg) => {
76407640
InboundV2Channel::new(&self.fee_estimator, &self.entropy_source, &self.signer_provider,
7641-
*counterparty_node_id, &self.channel_type_features(), &peer_state.latest_features,
7641+
self.get_our_node_id(), *counterparty_node_id, &self.channel_type_features(), &peer_state.latest_features,
76427642
&open_channel_msg, funding_inputs, user_channel_id, &self.default_configuration, best_block_height,
76437643
&self.logger
76447644
).map_err(|_| MsgHandleErrInternal::from_chan_no_close(
@@ -7910,7 +7910,7 @@ where
79107910
},
79117911
OpenChannelMessageRef::V2(msg) => {
79127912
let channel = InboundV2Channel::new(&self.fee_estimator, &self.entropy_source,
7913-
&self.signer_provider, *counterparty_node_id, &self.channel_type_features(),
7913+
&self.signer_provider, self.get_our_node_id(), *counterparty_node_id, &self.channel_type_features(),
79147914
&peer_state.latest_features, msg, vec![], user_channel_id, &self.default_configuration,
79157915
best_block_height, &self.logger
79167916
).map_err(|e| MsgHandleErrInternal::from_chan_no_close(e, msg.common_fields.temporary_channel_id))?;

0 commit comments

Comments
 (0)