Skip to content

Commit 05b61e0

Browse files
committed
f Improve docs, merge some variants
1 parent 6ba7461 commit 05b61e0

File tree

2 files changed

+14
-16
lines changed

2 files changed

+14
-16
lines changed

lightning/src/chain/chaininterface.rs

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -33,32 +33,30 @@ pub enum TransactionType {
3333
/// A single funding transaction may establish multiple channels when using batch funding.
3434
channel_ids: Vec<ChannelId>,
3535
},
36-
/// A cooperative close transaction mutually agreed upon by both parties.
36+
/// A transaction cooperatively closing a channel.
3737
CooperativeClose {
3838
/// The ID of the channel being closed.
3939
channel_id: ChannelId,
4040
},
41-
/// A commitment transaction being broadcast to force-close the channel.
42-
Commitment {
41+
/// A transaction being broadcast to force-close the channel.
42+
UnilateralClose {
4343
/// The ID of the channel being force-closed.
4444
channel_id: ChannelId,
4545
},
46-
/// An anchor transaction used for CPFP fee-bumping a commitment transaction.
47-
Anchor {
48-
/// The ID of the channel whose commitment transaction is being fee-bumped.
46+
/// An anchor bumping transaction used for CPFP fee-bumping a closing transaction.
47+
AnchorBump {
48+
/// The ID of the channel whose closing transaction is being fee-bumped.
4949
channel_id: ChannelId,
5050
},
5151
/// A transaction claiming outputs from a commitment transaction (HTLC claims, penalty/justice).
5252
Claim {
5353
/// The ID of the channel from which outputs are being claimed.
5454
channel_id: ChannelId,
5555
},
56-
/// An HTLC resolution transaction (HTLC-timeout or HTLC-success) for anchor channels.
57-
HtlcResolution {
58-
/// The ID of the channel whose HTLCs are being resolved.
59-
channel_id: ChannelId,
60-
},
61-
/// A transaction sweeping spendable outputs to the user's wallet.
56+
/// A transaction genered by the [`OutputSweeper`], sweeping [`SpendableOutputDescriptor`]s to the user's wallet.
57+
///
58+
/// [`OutputSweeper`]: crate::util::sweep::OutputSweeper
59+
/// [`SpendableOutputDescriptor`]: crate::sign::SpendableOutputDescriptor
6260
Sweep {
6361
/// The IDs of the channels from which outputs are being swept, if known.
6462
///

lightning/src/events/bump_transaction/mod.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -790,7 +790,7 @@ where
790790
package_target_feerate_sat_per_1000_weight);
791791
self.broadcaster.broadcast_transactions(&[(
792792
&commitment_tx,
793-
TransactionType::Commitment { channel_id },
793+
TransactionType::UnilateralClose { channel_id },
794794
)]);
795795
return Ok(());
796796
}
@@ -959,8 +959,8 @@ where
959959
commitment_tx.compute_txid()
960960
);
961961
self.broadcaster.broadcast_transactions(&[
962-
(&commitment_tx, TransactionType::Commitment { channel_id }),
963-
(&anchor_tx, TransactionType::Anchor { channel_id }),
962+
(&commitment_tx, TransactionType::UnilateralClose { channel_id }),
963+
(&anchor_tx, TransactionType::AnchorBump { channel_id }),
964964
]);
965965
return Ok(());
966966
}
@@ -1196,7 +1196,7 @@ where
11961196
log_info!(self.logger, "Broadcasting {}", log_tx!(htlc_tx));
11971197
self.broadcaster.broadcast_transactions(&[(
11981198
&htlc_tx,
1199-
TransactionType::HtlcResolution { channel_id },
1199+
TransactionType::UnilateralClose { channel_id },
12001200
)]);
12011201
}
12021202

0 commit comments

Comments
 (0)