Skip to content

Commit 26ce75f

Browse files
committed
Clean up comments
1 parent 2591320 commit 26ce75f

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

lightning/src/ln/interactivetxs.rs

+6-1
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.
@@ -368,6 +370,8 @@ impl<S> InteractiveTxStateMachine<S>
368370

369371
impl InteractiveTxStateMachine<TheirTxComplete> {
370372
fn send_tx_complete(self) -> InteractiveTxStateMachine<NegotiationComplete> {
373+
// TODO: Should we validate before transitioning states? If so, do we want to abort negotiation
374+
// if our current transaction state is invalid?
371375
InteractiveTxStateMachine {
372376
context: self.context,
373377
state: NegotiationComplete {}
@@ -387,6 +391,8 @@ impl InteractiveTxStateMachine<Negotiating> {
387391
}
388392

389393
fn send_tx_complete(self) -> InteractiveTxStateMachine<OurTxComplete> {
394+
// TODO: Should we validate before transitioning states? If so, do we want to abort negotiation
395+
// if our current transaction state is invalid?
390396
InteractiveTxStateMachine {
391397
context: self.context,
392398
state: OurTxComplete {}
@@ -456,7 +462,6 @@ impl InteractiveTxConstructor {
456462
}
457463
}
458464

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

0 commit comments

Comments
 (0)