Skip to content

Commit

Permalink
Clean up comments
Browse files Browse the repository at this point in the history
  • Loading branch information
jurvis committed Jul 17, 2023
1 parent 2591320 commit 26ce75f
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lightning/src/ln/interactivetxs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -368,6 +370,8 @@ impl<S> InteractiveTxStateMachine<S>

impl InteractiveTxStateMachine<TheirTxComplete> {
fn send_tx_complete(self) -> InteractiveTxStateMachine<NegotiationComplete> {
// 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 {}
Expand All @@ -387,6 +391,8 @@ impl InteractiveTxStateMachine<Negotiating> {
}

fn send_tx_complete(self) -> InteractiveTxStateMachine<OurTxComplete> {
// 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 {}
Expand Down Expand Up @@ -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))
}
Expand Down

0 comments on commit 26ce75f

Please sign in to comment.