@@ -87,6 +87,8 @@ pub(crate) enum AbortReason {
87
87
// │ │
88
88
// └──────────────────────────────┘
89
89
//
90
+
91
+ // Channel states that can receive `(send|receive)_tx_(add|remove)_(input|output)`
90
92
pub ( crate ) trait AcceptingChanges { }
91
93
92
94
/// We are currently in the process of negotiating the transaction.
@@ -368,6 +370,8 @@ impl<S> InteractiveTxStateMachine<S>
368
370
369
371
impl InteractiveTxStateMachine < TheirTxComplete > {
370
372
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?
371
375
InteractiveTxStateMachine {
372
376
context : self . context ,
373
377
state : NegotiationComplete { }
@@ -387,6 +391,8 @@ impl InteractiveTxStateMachine<Negotiating> {
387
391
}
388
392
389
393
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?
390
396
InteractiveTxStateMachine {
391
397
context : self . context ,
392
398
state : OurTxComplete { }
@@ -456,7 +462,6 @@ impl InteractiveTxConstructor {
456
462
}
457
463
}
458
464
459
- // Functions that handle the case where mode is [`ChannelMode::Negotiating`]
460
465
fn abort_negotation ( & mut self , reason : AbortReason ) {
461
466
self . handle_negotiating_receive ( |state_machine| state_machine. abort_negotiation ( reason) )
462
467
}
0 commit comments