Skip to content

Commit 260e49c

Browse files
committed
Clean up comments
1 parent c55f79b commit 260e49c

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

lightning/src/ln/interactivetxs.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,8 @@ pub(crate) enum AbortReason {
8787
// │ │
8888
// └──────────────────────────────┘
8989
//
90+
91+
// Channel states that can receive `(send|receive)_tx_(add|remove)_(input|output)`
9092
pub(crate) trait AcceptingChanges {}
9193

9294
/// We are currently in the process of negotiating the transaction.
@@ -364,6 +366,8 @@ impl<S> InteractiveTxStateMachine<S>
364366

365367
impl InteractiveTxStateMachine<TheirTxComplete> {
366368
fn send_tx_complete(self) -> InteractiveTxStateMachine<NegotiationComplete> {
369+
// TODO: Should we validate before transitioning states? If so, do we want to abort negotiation
370+
// if our current transaction state is invalid?
367371
InteractiveTxStateMachine {
368372
context: self.context,
369373
state: NegotiationComplete {}
@@ -383,6 +387,8 @@ impl InteractiveTxStateMachine<Negotiating> {
383387
}
384388

385389
fn send_tx_complete(self) -> InteractiveTxStateMachine<OurTxComplete> {
390+
// TODO: Should we validate before transitioning states? If so, do we want to abort negotiation
391+
// if our current transaction state is invalid?
386392
InteractiveTxStateMachine {
387393
context: self.context,
388394
state: OurTxComplete {}
@@ -452,7 +458,6 @@ impl InteractiveTxConstructor {
452458
}
453459
}
454460

455-
// Functions that handle the case where mode is [`ChannelMode::Negotiating`]
456461
fn abort_negotation(&mut self, reason: AbortReason) {
457462
self.handle_negotiating_receive(|state_machine| state_machine.abort_negotiation(reason))
458463
}

0 commit comments

Comments
 (0)