From 26ce75f8f52f14fc35d2310a20ea867cde9764ff Mon Sep 17 00:00:00 2001 From: Jurvis Tan Date: Sun, 16 Jul 2023 17:13:19 -0700 Subject: [PATCH] Clean up comments --- lightning/src/ln/interactivetxs.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lightning/src/ln/interactivetxs.rs b/lightning/src/ln/interactivetxs.rs index 3aa8e8527e8..b9494b37260 100644 --- a/lightning/src/ln/interactivetxs.rs +++ b/lightning/src/ln/interactivetxs.rs @@ -87,6 +87,8 @@ pub(crate) enum AbortReason { // │ │ // └──────────────────────────────┘ // + +// Channel states that can receive `(send|receive)_tx_(add|remove)_(input|output)` pub(crate) trait AcceptingChanges {} /// We are currently in the process of negotiating the transaction. @@ -368,6 +370,8 @@ impl InteractiveTxStateMachine impl InteractiveTxStateMachine { fn send_tx_complete(self) -> InteractiveTxStateMachine { + // TODO: Should we validate before transitioning states? If so, do we want to abort negotiation + // if our current transaction state is invalid? InteractiveTxStateMachine { context: self.context, state: NegotiationComplete {} @@ -387,6 +391,8 @@ impl InteractiveTxStateMachine { } fn send_tx_complete(self) -> InteractiveTxStateMachine { + // TODO: Should we validate before transitioning states? If so, do we want to abort negotiation + // if our current transaction state is invalid? InteractiveTxStateMachine { context: self.context, state: OurTxComplete {} @@ -456,7 +462,6 @@ impl InteractiveTxConstructor { } } - // Functions that handle the case where mode is [`ChannelMode::Negotiating`] fn abort_negotation(&mut self, reason: AbortReason) { self.handle_negotiating_receive(|state_machine| state_machine.abort_negotiation(reason)) }