Skip to content

Commit 8ca6d79

Browse files
committed
f misc fixups
* remove extra spaces * add failure and persistence section * remove mentions of dual-funding methods * remove unnecessary into_iter().collect() in provide_holder_witnesses()
1 parent 58d4ba9 commit 8ca6d79

File tree

3 files changed

+16
-19
lines changed

3 files changed

+16
-19
lines changed

lightning/src/events/mod.rs

Lines changed: 12 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1582,24 +1582,30 @@ pub enum Event {
15821582
/// onion messages.
15831583
peer_node_id: PublicKey,
15841584
},
1585-
/// Indicates that a funding transaction constructed via interactive transaction construction for a
1586-
/// channel is ready to be signed by the client. This event will only be triggered
1585+
/// Indicates that a funding transaction constructed via interactive transaction construction for
1586+
/// a new channel or splice is ready to be signed by the client. This event will only be triggered
15871587
/// if at least one input was contributed by the holder and needs to be signed.
15881588
///
1589-
/// The transaction contains all inputs provided by both parties along with the channel's funding
1589+
/// The transaction contains all inputs provided by both parties along with the channel's funding
15901590
/// output and a change output if applicable.
15911591
///
15921592
/// No part of the transaction should be changed before signing as the content of the transaction
15931593
/// has already been negotiated with the counterparty.
15941594
///
1595-
/// Each signature MUST use the SIGHASH_ALL flag to avoid invalidation of the initial commitment and
1596-
/// hence possible loss of funds.
1595+
/// Each signature MUST use the `SIGHASH_ALL` flag to avoid invalidation of the initial commitment
1596+
/// and hence possible loss of funds.
15971597
///
15981598
/// After signing, call [`ChannelManager::funding_transaction_signed`] with the (partially) signed
15991599
/// funding transaction.
16001600
///
16011601
/// Generated in [`ChannelManager`] message handling.
16021602
///
1603+
/// # Failure Behavior and Persistence
1604+
/// This event will eventually be replayed after failures-to-handle (i.e., the event handler
1605+
/// returning `Err(ReplayEvent ())`), but won't be persisted across restarts as the new channel
1606+
/// or spliced channel associated with the constructed funding transaction is not persisted at
1607+
/// this point.
1608+
///
16031609
/// [`ChannelManager`]: crate::ln::channelmanager::ChannelManager
16041610
/// [`ChannelManager::funding_transaction_signed`]: crate::ln::channelmanager::ChannelManager::funding_transaction_signed
16051611
FundingTransactionReadyForSigning {
@@ -1613,17 +1619,7 @@ pub enum Event {
16131619
///
16141620
/// [`ChannelManager::funding_transaction_signed`]: crate::ln::channelmanager::ChannelManager::funding_transaction_signed
16151621
counterparty_node_id: PublicKey,
1616-
// TODO(dual_funding): Enable links when methods are implemented
1617-
/// The `user_channel_id` value passed in to `ChannelManager::create_dual_funded_channel` for outbound
1618-
/// channels, or to [`ChannelManager::accept_inbound_channel`] or `ChannelManager::accept_inbound_channel_with_contribution`
1619-
/// for inbound channels if [`UserConfig::manually_accept_inbound_channels`] config flag is set to true.
1620-
/// Otherwise `user_channel_id` will be randomized for an inbound channel.
1621-
/// This may be zero for objects serialized with LDK versions prior to 0.0.113.
1622-
///
1623-
/// [`ChannelManager::accept_inbound_channel`]: crate::ln::channelmanager::ChannelManager::accept_inbound_channel
1624-
/// [`UserConfig::manually_accept_inbound_channels`]: crate::util::config::UserConfig::manually_accept_inbound_channels
1625-
// [`ChannelManager::create_dual_funded_channel`]: crate::ln::channelmanager::ChannelManager::create_dual_funded_channel
1626-
// [`ChannelManager::accept_inbound_channel_with_contribution`]: crate::ln::channelmanager::ChannelManager::accept_inbound_channel_with_contribution
1622+
/// The `user_channel_id` value for the channel.
16271623
user_channel_id: u128,
16281624
/// The unsigned transaction to be signed and passed back to
16291625
/// [`ChannelManager::funding_transaction_signed`].

lightning/src/ln/channelmanager.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5892,7 +5892,7 @@ where
58925892
/// counterparty's signature(s) the funding transaction will automatically be broadcast via the
58935893
/// [`BroadcasterInterface`] provided when this `ChannelManager` was constructed.
58945894
///
5895-
/// SIGHASH_ALL MUST be used for all signatures when providing signatures.
5895+
/// `SIGHASH_ALL` MUST be used for all signatures when providing signatures.
58965896
///
58975897
/// <div class="warning">
58985898
/// WARNING: LDK makes no attempt to prevent the counterparty from using non-standard inputs which
@@ -7726,7 +7726,8 @@ where
77267726
ComplFunc: FnOnce(
77277727
Option<u64>,
77287728
bool,
7729-
) -> (Option<MonitorUpdateCompletionAction>, Option<RAAMonitorUpdateBlockingAction>),
7729+
)
7730+
-> (Option<MonitorUpdateCompletionAction>, Option<RAAMonitorUpdateBlockingAction>),
77307731
>(
77317732
&self, prev_hop: HTLCPreviousHopData, payment_preimage: PaymentPreimage,
77327733
payment_info: Option<PaymentClaimDetails>, completion_action: ComplFunc,

lightning/src/ln/interactivetxs.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -409,8 +409,8 @@ impl InteractiveTxSigningSession {
409409
self.unsigned_tx.add_local_witnesses(witnesses.clone());
410410
self.holder_tx_signatures = Some(TxSignatures {
411411
channel_id,
412+
witnesses,
412413
tx_hash: self.unsigned_tx.compute_txid(),
413-
witnesses: witnesses.into_iter().collect(),
414414
shared_input_signature: None,
415415
});
416416

0 commit comments

Comments
 (0)